Attempt smarter handling of init reboot sequence
All checks were successful
Basic Cargo Checks / docker-check (push) Successful in 1m38s
Basic Cargo Checks / docker-build (push) Successful in 5m2s

This commit is contained in:
Blizzard Finnegan 2023-06-21 12:24:22 -04:00
parent e0e8562d23
commit 5a7183b154
Signed by: blizzardfinnegan
GPG key ID: 61C1E13067E0018E

View file

@ -113,10 +113,8 @@ impl Device{
Response::BPOn | Response::BPOff | Response::TempCount(_) |
Response::DebugMenu=>{
usb_port.write_to_device(Command::Quit);
_ = usb_port.read_from_device(None);
usb_port.write_to_device(Command::Newline);
match usb_port.read_from_device(None){
Response::Rebooting => {
Response::ShuttingDown | Response::Rebooting => {
while usb_port.read_from_device(None) != Response::LoginPrompt {}
initial_state = State::LoginPrompt;
},