comments and abort

This commit is contained in:
2024-08-24 00:35:54 -04:00
parent 3cf3dc5936
commit 7aab854a6b
2 changed files with 8 additions and 7 deletions

View File

@ -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)}
}
};
}
}
}