Code cleanup.

- firmware now supports SM buffering, so SMQB command is no longer needed
- commmented code and repeated fragments removed
This commit is contained in:
Bartosz Borkowski
2015-05-28 22:19:04 +02:00
parent 6505252c20
commit 7464762465
4 changed files with 34 additions and 75 deletions

View File

@@ -29,7 +29,10 @@ private:
public:
Button(byte p, ActionCb a): debounce(0), state(1), lastState(1), action(a), pin(p) {} ;
Button(byte p, ActionCb a): debounce(0), state(1), lastState(1), action(a), pin(p) {
pinMode(pin, INPUT_PULLUP);
}
void check() {
byte b = digitalRead(pin);
long t = millis();
@@ -49,10 +52,7 @@ public:
}
lastState = b;
};
}
}; //button
#endif //__BUTTON_H__