Skip to content

Commit

Permalink
Arduino: Terminate idle sequence if there's data on the serial port
Browse files Browse the repository at this point in the history
  • Loading branch information
geefr committed May 14, 2020
1 parent 91cb807 commit 95bb7ad
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ void pattern_runFadeSequence( struct LightFadeSequence& f ) {
for( auto i = 0u; i < f.numFades; ++i ) {
auto& fade = fades[i];
fade.tick(now);
if( Serial.peek() != -1 ) { delete [] fades; return; }
}
if( fades[f.numFades - 1].done() ) break;
}
Expand Down

0 comments on commit 95bb7ad

Please sign in to comment.