work in progress on switching to direct mode
This commit is contained in:
@ -39,6 +39,9 @@ pub enum Menu<'a> {
|
||||
/// Simulate the PIC controller sending us a Stop character
|
||||
PicRecvStop,
|
||||
|
||||
/// Simulate the PIC controller sending a "pair" button press
|
||||
PicRecvPair,
|
||||
|
||||
/// Send a bluetooth characteristic: Up
|
||||
BluetoothUp {
|
||||
/// 0 for not pressed, 1 for pressed
|
||||
@ -74,10 +77,14 @@ pub enum Menu<'a> {
|
||||
/// Send a bluetooth characteristic: Wifi Password
|
||||
BluetoothWifiPassword { wifipass: &'a str },
|
||||
|
||||
/// Change log level (None: 0, .. Tracing: 5)
|
||||
Log { level: u8 },
|
||||
|
||||
/// Abort (resets microcontroller)
|
||||
Abort,
|
||||
|
||||
/// Erase BLE Bonding information
|
||||
ClearBleBonds,
|
||||
|
||||
}
|
||||
|
||||
@ -101,6 +108,10 @@ pub fn process_menu(
|
||||
cli.writer().write_str("Sending PicButtonStop command")?;
|
||||
let _ = dispatch.send_blocking(Commands::PicRecvStop);
|
||||
}
|
||||
Menu::PicRecvPair => {
|
||||
cli.writer().write_str("Sending PIC command and timer reset (the job of the pair button driver, once PIC interface exists)")?; //TODO: PIC get this.
|
||||
let _ = dispatch.send_blocking(Commands::AllowPairing);
|
||||
}
|
||||
Menu::BluetoothUp { data } => {
|
||||
cli.writer()
|
||||
.write_str("Sending BluetoothUp")?;
|
||||
@ -180,6 +191,9 @@ pub fn process_menu(
|
||||
trace!("trace test");
|
||||
}
|
||||
Menu::Abort => {panic!("CLI user requested abort");}
|
||||
Menu::ClearBleBonds => {
|
||||
let _ = dispatch.send_blocking(Commands::EraseBleBonds);
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user