Stop rotor when USB connections break

This commit is contained in:
Sebastian 2022-08-28 00:13:22 +02:00
parent e7c9f5c5cc
commit 5f3f5e63b2

View file

@ -159,6 +159,8 @@ pub async fn usb_task(
buffer = String::from(&buffer.as_str()[line_end + 1..]);
}
defmt::info!("USB disconnected");
// USB connection is broken, so better stop the rotor.
cmd_sender.send(Gs232Cmd::Stop);
}
};