More consistent bluetooth notify

This commit is contained in:
2024-08-24 11:45:09 -04:00
parent 1c7a10c330
commit 5772ae2ed6
6 changed files with 36 additions and 47 deletions

View File

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