Skip to content

Commit 13e5117

Browse files
committed
ledmatrix: Read sleep pin and turn off LEDs
Turns LEDs off slowly and on slowly when sleep pin goes low/high. Signed-off-by: Daniel Schaefer <[email protected]>
1 parent ca9791f commit 13e5117

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

ledmatrix/src/main.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -217,16 +217,15 @@ fn main() -> ! {
217217
let mut startup_percentage = Some(0);
218218

219219
loop {
220-
// TODO: Current hardware revision does not have the sleep pin wired up :(
221220
// Go to sleep if the host is sleeping
222-
let _host_sleeping = sleep.is_low().unwrap();
223-
//handle_sleep(
224-
// host_sleeping,
225-
// &mut state,
226-
// &mut matrix,
227-
// &mut delay,
228-
// &mut led_enable,
229-
//);
221+
let host_sleeping = sleep.is_low().unwrap();
222+
handle_sleep(
223+
host_sleeping,
224+
&mut state,
225+
&mut matrix,
226+
&mut delay,
227+
&mut led_enable,
228+
);
230229

231230
// Handle period display updates. Don't do it too often
232231
if timer.get_counter().ticks() > prev_timer + state.animation_period {

0 commit comments

Comments
 (0)