More consistent bluetooth notify
This commit is contained in:
@ -24,10 +24,17 @@ pub enum Commands {
|
||||
ButtonTimerRestart,
|
||||
ButtonTimerClear,
|
||||
|
||||
NotifyMotorUp,
|
||||
NotifyMotorDown,
|
||||
NotifyMotorStopping,
|
||||
NotifyMotorStopped, // Signaled after stop timeout
|
||||
NotifyMotorUp {data: u8},
|
||||
NotifyMotorDown {data: u8},
|
||||
NotifyMotorStop {data: u8},
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
pub struct Button;
|
||||
|
||||
impl Button {
|
||||
pub const PRESSED: u8 = 0x1;
|
||||
pub const RELEASED: u8 = 0x0;
|
||||
}
|
||||
|
||||
pub type CmdType = std::mem::Discriminant<Commands>;
|
||||
|
||||
Reference in New Issue
Block a user