Skip to content

Commit

Permalink
Move the yield to yield only if we have a sufficient remainingTimeBudget
Browse files Browse the repository at this point in the history
  • Loading branch information
DJFliX committed Feb 9, 2016
1 parent abe6507 commit 55b0f7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/oakpowerboard/oakpowerboard.ino
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ bool btn_state = false;

void loop() {
int remainingTimeBudget = ui.update();
yield();
long deadline = millis() + remainingTimeBudget;

if (remainingTimeBudget > 0) {

yield();
if(b1_pressed == true) {
ui.nextFrame();
b1_pressed = false;
Expand Down

0 comments on commit 55b0f7a

Please sign in to comment.