rust
This commit is contained in:
@ -131,7 +131,7 @@ pub fn clearserilport() -> String{
|
||||
match &mut port_info.port {
|
||||
Some(p) => {
|
||||
p.set_timeout(Duration::from_millis(100)).unwrap();
|
||||
while true{
|
||||
loop{
|
||||
let sizeread =match p.read(&mut buf){
|
||||
Ok(size)=>{size},
|
||||
Err(_e)=>{return "Port is not open".to_string()}
|
||||
|
||||
Reference in New Issue
Block a user