Start debugging partial function
This commit is contained in:
parent
94cbba27cf
commit
d24b0edcb0
1 changed files with 6 additions and 2 deletions
|
@ -352,7 +352,8 @@ impl Device{
|
||||||
while self.usb_tty.read_from_device(None) != Response::ShellPrompt {}
|
while self.usb_tty.read_from_device(None) != Response::ShellPrompt {}
|
||||||
self.usb_tty.write_to_device(Command::GetSerial);
|
self.usb_tty.write_to_device(Command::GetSerial);
|
||||||
loop{
|
loop{
|
||||||
match self.usb_tty.read_from_device(None){
|
let return_value = self.usb_tty.read_from_device(None);
|
||||||
|
match return_value{
|
||||||
Response::Serial(Some(contains_serial)) =>{
|
Response::Serial(Some(contains_serial)) =>{
|
||||||
for line in contains_serial.split("\n").collect::<Vec<&str>>(){
|
for line in contains_serial.split("\n").collect::<Vec<&str>>(){
|
||||||
if !line.contains(':') { continue; }
|
if !line.contains(':') { continue; }
|
||||||
|
@ -365,7 +366,10 @@ impl Device{
|
||||||
break;
|
break;
|
||||||
},
|
},
|
||||||
Response::DebugInit => { continue; }
|
Response::DebugInit => { continue; }
|
||||||
_ => todo!(),
|
_ => {
|
||||||
|
log::error!("Bad value: {:?}",return_value);
|
||||||
|
todo!();
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
self.reboot();
|
self.reboot();
|
||||||
|
|
Loading…
Add table
Reference in a new issue