Closes #22.
This commit is contained in:
@@ -73,15 +73,16 @@ void loop()
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case INCR: // increment the counter
|
case INCR:
|
||||||
count = min(count++, MAX_COUNT); // but not more than the specified maximum
|
++count; // increment the counter
|
||||||
|
count = min(count, MAX_COUNT); // but not more than the specified maximum
|
||||||
STATE = WAIT;
|
STATE = WAIT;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DECR: // decrement the counter
|
case DECR:
|
||||||
count = max(count--, MIN_COUNT); // but not less than the specified minimum
|
--count; // decrement the counter
|
||||||
|
count = max(count, MIN_COUNT); // but not less than the specified minimum
|
||||||
STATE = WAIT;
|
STATE = WAIT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name=JC_Button
|
name=JC_Button
|
||||||
version=2.1.0
|
version=2.1.1
|
||||||
author=Jack Christensen <jack.christensen@outlook.com>
|
author=Jack Christensen <jack.christensen@outlook.com>
|
||||||
maintainer=Jack Christensen <jack.christensen@outlook.com>
|
maintainer=Jack Christensen <jack.christensen@outlook.com>
|
||||||
sentence=Arduino library to debounce button switches, detect presses, releases, and long presses.
|
sentence=Arduino library to debounce button switches, detect presses, releases, and long presses.
|
||||||
|
|||||||
Reference in New Issue
Block a user