This commit is contained in:
JChristensen
2019-06-25 19:57:01 -04:00
parent b87dcd96d9
commit 8da4933e9d
2 changed files with 7 additions and 6 deletions

View File

@@ -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;
}
}

View File

@@ -1,5 +1,5 @@
name=JC_Button
version=2.1.0
version=2.1.1
author=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.