comments and abort
This commit is contained in:
@ -75,6 +75,9 @@ pub enum Menu<'a> {
|
||||
BluetoothWifiPassword { wifipass: &'a str },
|
||||
|
||||
Log { level: u8 },
|
||||
|
||||
/// Abort (resets microcontroller)
|
||||
Abort,
|
||||
|
||||
}
|
||||
|
||||
@ -176,6 +179,7 @@ pub fn process_menu(
|
||||
debug!("debug test");
|
||||
trace!("trace test");
|
||||
}
|
||||
Menu::Abort => {panic!("CLI user requested abort");}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
@ -224,8 +228,8 @@ pub async fn start_cli(dispatch: Sender<Commands>) -> anyhow::Result<()> {
|
||||
}
|
||||
Err(e) => match e.kind() {
|
||||
std::io::ErrorKind::WouldBlock => {} // This is expected if there is no input
|
||||
_ => {warn!("Error waiting for input: {}", e)}
|
||||
_ => {warn!("Error waiting for CLI input: {}", e)}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user