Rename (invalid) BOUNCE_LOCK-OUT to (valid) BOUNCE_LOCK_OUT #6

Merged
chrivers merged 2 commits from master into master 2014-10-14 18:41:16 +04:00
2 changed files with 7 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) {
+5 -1
View File
@@ -29,8 +29,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Previous contributions by Eric Lowry, Jim Schimpf and Tom Harkaway
* * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifdef BOUNCE_LOCK
#error You are using the invalid BOUNCE_LOCK-OUT define. Please update your sources to use BOUNCE_LOCK_OUT
#endif
// Uncomment the following line for "LOCK-OUT" debounce method
//#define BOUNCE_LOCK-OUT
//#define BOUNCE_LOCK_OUT
#ifndef Bounce2_h