//! Board wiring and strip geometry. //! //! Everything that changes when the hardware changes lives here. /// Number of WS2812B pixels on the strip. pub const LED_COUNT: usize = 24; /// Ceiling on the duty cycle applied to every channel, as a fraction of 255. /// /// Takes the top off peak current draw. This is a brightness cap, not a /// current limit: a strip of this length still needs its own 5V supply. pub const MAX_DUTY: u8 = 200; /// Rotary encoder detents per full revolution, used to scale a turn into a /// brightness step. pub const STEPS_PER_BRIGHTNESS_UNIT: i32 = 1; /// Hold time that separates a click from a long press. pub const LONG_PRESS_MS: u64 = 600; /// Hold time that makes the light forget its Zigbee network and go back to /// pairing mode. pub const RESET_HOLD_MS: u64 = 10_000; /// Contact settle time for the encoder push button. pub const DEBOUNCE_MS: u64 = 15; /// Heartbeat blink: a brief pulse, repeated once a second. pub const HEARTBEAT_ON_MS: u64 = 50; pub const HEARTBEAT_PERIOD_MS: u64 = 1000; /// The faster blink that shows the light is looking for a Zigbee network to /// join, so a pairing window can be seen to be waiting for it. pub const SEARCHING_ON_MS: u64 = 100; pub const SEARCHING_PERIOD_MS: u64 = 300;