Add parsing for DebugInit
This commit is contained in:
parent
3070e42945
commit
ebda011bc7
1 changed files with 14 additions and 10 deletions
|
@ -351,6 +351,7 @@ impl Device{
|
|||
self.usb_tty.write_to_device(Command::Login);
|
||||
while self.usb_tty.read_from_device(None) != Response::ShellPrompt {}
|
||||
self.usb_tty.write_to_device(Command::GetSerial);
|
||||
loop{
|
||||
match self.usb_tty.read_from_device(None){
|
||||
Response::Serial(Some(contains_serial)) =>{
|
||||
for line in contains_serial.split("\n").collect::<Vec<&str>>(){
|
||||
|
@ -360,9 +361,12 @@ impl Device{
|
|||
self.serial = value.trim().replace("\"","");
|
||||
}
|
||||
}
|
||||
break;
|
||||
},
|
||||
Response::DebugInit => { continue; }
|
||||
_ => todo!(),
|
||||
}
|
||||
}
|
||||
self.reboot();
|
||||
//self.serial = serial.to_string();
|
||||
self.load_values();
|
||||
|
|
Loading…
Add table
Reference in a new issue