diff --git a/src/interval.cpp b/src/interval.cpp index 0f32daf..64972b1 100644 --- a/src/interval.cpp +++ b/src/interval.cpp @@ -24,7 +24,7 @@ bool Interval::expired(void) bool result = false; if (_done) { - if (1 == mode) + if (1 == _mode) { // oneshot mode if ((millis() - _timefrom) >= _timeout) { @@ -32,7 +32,7 @@ bool Interval::expired(void) result = true; } } - else if (2 == mode) + else if (2 == _mode) { // periodic mode if ((millis() - _timefrom) >= _timeout) {