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:
10
button.h
10
button.h
@@ -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__
|
||||
|
||||
Reference in New Issue
Block a user