From d24b0edcb00b372cb03af9af24b88378aa468a86 Mon Sep 17 00:00:00 2001 From: Blizzard Finnegan Date: Mon, 19 Jun 2023 14:45:58 -0400 Subject: [PATCH] Start debugging partial function --- src/device.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/device.rs b/src/device.rs index 7f8acd5..2005a7e 100755 --- a/src/device.rs +++ b/src/device.rs @@ -352,7 +352,8 @@ impl Device{ 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){ + let return_value = self.usb_tty.read_from_device(None); + match return_value{ Response::Serial(Some(contains_serial)) =>{ for line in contains_serial.split("\n").collect::>(){ if !line.contains(':') { continue; } @@ -365,7 +366,10 @@ impl Device{ break; }, Response::DebugInit => { continue; } - _ => todo!(), + _ => { + log::error!("Bad value: {:?}",return_value); + todo!(); + }, } } self.reboot();