test
This commit is contained in:
@ -246,10 +246,10 @@ pub fn readforport()->Vec<u8>{
|
||||
if port_info.port_name == "NON" {
|
||||
return "Port is not set".as_bytes().to_vec();
|
||||
}
|
||||
let mut buf: Vec<u8> = vec![0; 1000];
|
||||
let mut buf: Vec<u8> = vec![0; 5000];
|
||||
match &mut port_info.port {
|
||||
Some(p) => {
|
||||
p.set_timeout(Duration::from_millis(100)).unwrap();
|
||||
p.set_timeout(Duration::from_millis(10)).unwrap();
|
||||
let sizeread =match p.read(&mut buf){
|
||||
Ok(size)=>{size},
|
||||
Err(_e)=>{0}
|
||||
|
||||
Reference in New Issue
Block a user