* Renamed BOUNCE_LOCK-OUT to BOUNCE_LOCK_OUT. Only the latter is a valid preprocessor define

This commit is contained in:
Christian Iversen
2014-10-11 18:17:43 +02:00
parent 8516aeac01
commit 91a6e946b6
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -27,7 +27,7 @@ void Bounce::attach(int pin) {
if (digitalRead(pin)) {
state = _BV(DEBOUNCED_STATE) | _BV(UNSTABLE_STATE);
}
#ifdef BOUNCE_LOCK-OUT
#ifdef BOUNCE_LOCK_OUT
previous_millis = 0;
#else
previous_millis = millis();
@@ -41,7 +41,7 @@ void Bounce::interval(uint16_t interval_millis)
bool Bounce::update()
{
#ifdef BOUNCE_LOCK-OUT
#ifdef BOUNCE_LOCK_OUT
state &= ~_BV(STATE_CHANGED);
// Ignore everything if we are locked out
if (millis() - previous_millis >= interval_millis) {
+1 -1
View File
@@ -30,7 +30,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * */
// Uncomment the following line for "LOCK-OUT" debounce method
//#define BOUNCE_LOCK-OUT
//#define BOUNCE_LOCK_OUT
#ifndef Bounce2_h