File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -361,6 +361,7 @@ fn main() -> ! {
361361 Ok ( count) => {
362362 let random = get_random_byte ( & rosc) ;
363363 match ( parse_command ( count, & buf) , & state. sleeping ) {
364+ // While sleeping no command is handled, except waking up
364365 ( Some ( Command :: Sleep ( go_sleeping) ) , _) => {
365366 sleeping = go_sleeping;
366367 handle_sleep (
@@ -383,7 +384,9 @@ fn main() -> ! {
383384 // If there's a very early command, cancel the startup animation
384385 startup_percentage = None ;
385386
386- // While sleeping no command is handled, except waking up
387+ // Reset sleep timer when interacting with the device
388+ sleep_timer = timer. get_counter ( ) . ticks ( ) ;
389+
387390 if let Some ( response) =
388391 handle_command ( & command, & mut state, & mut matrix, random)
389392 {
You can’t perform that action at this time.
0 commit comments