Stop rotor when USB connections break
This commit is contained in:
parent
e7c9f5c5cc
commit
5f3f5e63b2
|
@ -159,6 +159,8 @@ pub async fn usb_task(
|
||||||
buffer = String::from(&buffer.as_str()[line_end + 1..]);
|
buffer = String::from(&buffer.as_str()[line_end + 1..]);
|
||||||
}
|
}
|
||||||
defmt::info!("USB disconnected");
|
defmt::info!("USB disconnected");
|
||||||
|
// USB connection is broken, so better stop the rotor.
|
||||||
|
cmd_sender.send(Gs232Cmd::Stop);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue