From 8da4933e9d166e2511c05f8a05ede9eadbe57ce5 Mon Sep 17 00:00:00 2001 From: JChristensen Date: Tue, 25 Jun 2019 19:57:01 -0400 Subject: [PATCH] Closes #22. --- examples/UpDown/UpDown.ino | 11 ++++++----- library.properties | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/examples/UpDown/UpDown.ino b/examples/UpDown/UpDown.ino index 70147ab..0bc0362 100644 --- a/examples/UpDown/UpDown.ino +++ b/examples/UpDown/UpDown.ino @@ -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; } } - diff --git a/library.properties b/library.properties index d25242b..c2fb14b 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=JC_Button -version=2.1.0 +version=2.1.1 author=Jack Christensen maintainer=Jack Christensen sentence=Arduino library to debounce button switches, detect presses, releases, and long presses.