pub enum Event {
ButtonEdge {
index: u8,
edge: Edge,
},
EncoderTurn {
index: u8,
clockwise: bool,
},
Analog {
index: u8,
raw: u16,
},
Midi {
data: [u8; 8],
len: u8,
source: MidiPort,
},
Tick,
}Expand description
Abstract input event. Hardware-agnostic — firmware maps GPIO edges to these, the simulator maps keyboard/WebSocket events to these.
Variants§
ButtonEdge
Button edge (index 0..5).
EncoderTurn
Encoder detent (index 0..1).
Analog
Analog input (expression pedal). Raw ADC value. Calibration (min/max) is read from Config.global.
Midi
Incoming MIDI message from any port.
Tick
Periodic tick — drives long-press detection. Send every 1-10ms. No-op if no buttons are held.
Trait Implementations§
impl Eq for Event
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more