v2.3.3 #19
2 changed files with 5 additions and 2 deletions
|
@ -115,8 +115,9 @@ impl Device{
|
|||
initial_state = State::LoginPrompt;
|
||||
},
|
||||
Response::UBoot=>{
|
||||
log::error!("A device was interrupted during the boot process! Please ensure all devices are completely booted and on the main screen, then restart this program.");
|
||||
return Err("Failed TTY init. Device in u-boot state, must be manually rebooted.".to_string());
|
||||
usb_port.write_to_device(Command::Boot);
|
||||
while usb_port.read_from_device(None) != Response::LoginPrompt {}
|
||||
initial_state = State::LoginPrompt;
|
||||
},
|
||||
//Response::Empty parsing here is potentially in bad faith
|
||||
Response::Other | Response::Empty | Response::ShellPrompt | Response::FailedDebugMenu | Response::DebugInit |
|
||||
|
|
|
@ -28,6 +28,7 @@ pub enum Command{
|
|||
Newline,
|
||||
Reboot,
|
||||
GetSerial,
|
||||
Boot,
|
||||
}
|
||||
|
||||
#[derive(Clone,Eq,Derivative,Debug)]
|
||||
|
@ -68,6 +69,7 @@ const COMMAND_MAP:Lazy<HashMap<Command,&str>> = Lazy::new(||HashMap::from([
|
|||
(Command::DebugMenu,"python3 -m debugmenu\n"),
|
||||
(Command::Newline,"\n"),
|
||||
(Command::Reboot,"shutdown -r now\n"),
|
||||
(Command::Boot,"boot\n"),
|
||||
(Command::GetSerial,"echo 'y1q' | python3 -m debugmenu\n"),
|
||||
]));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue