Skip to content

Commit

Permalink
Closes #22.
Browse files Browse the repository at this point in the history
  • Loading branch information
JChristensen committed Jun 25, 2019
1 parent b87dcd9 commit 8da4933
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions examples/UpDown/UpDown.ino
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,16 @@ void loop()
}
break;

case INCR: // increment the counter
count = min(count++, MAX_COUNT); // but not more than the specified maximum
case INCR:
++count; // increment the counter
count = min(count, MAX_COUNT); // but not more than the specified maximum
STATE = WAIT;
break;

case DECR: // decrement the counter
count = max(count--, MIN_COUNT); // but not less than the specified minimum
case DECR:
--count; // decrement the counter
count = max(count, MIN_COUNT); // but not less than the specified minimum
STATE = WAIT;
break;
}
}

2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=JC_Button
version=2.1.0
version=2.1.1
author=Jack Christensen <[email protected]>
maintainer=Jack Christensen <[email protected]>
sentence=Arduino library to debounce button switches, detect presses, releases, and long presses.
Expand Down

0 comments on commit 8da4933

Please sign in to comment.