Add analog_only option, though this is a stub for now.
This commit is contained in:
parent
e09c21edf1
commit
e8a1235a95
4 changed files with 20 additions and 15 deletions
8
Button.h
8
Button.h
|
@ -40,7 +40,7 @@ class Button {
|
|||
// and the multiplexer logic will be automatically invoked by Update()
|
||||
class SwitchButton : public Button {
|
||||
public:
|
||||
SwitchButton(uint8_t pin, uint8_t vbutton, bool pullup, Mux* mux);
|
||||
SwitchButton(uint8_t pin, uint8_t vbutton, bool pullup, Mux* mux, bool analog_only);
|
||||
bool BouncerUpdate(); // returns true if the pin's status has changed
|
||||
bool On();
|
||||
|
||||
|
@ -53,13 +53,13 @@ class SwitchButton : public Button {
|
|||
|
||||
class PassthruButton : public SwitchButton {
|
||||
public:
|
||||
PassthruButton(uint8_t pin, uint8_t vbutton, bool pullup = true, Mux* mux = NULL);
|
||||
PassthruButton(uint8_t pin, uint8_t vbutton, bool pullup = true, Mux* mux = NULL, bool analog_only = false);
|
||||
bool Update(Joystick* js);
|
||||
};
|
||||
|
||||
class LatchedButton : public SwitchButton {
|
||||
public:
|
||||
LatchedButton(uint8_t pin, uint8_t vbutton, bool pullup = true, Mux* mux = NULL);
|
||||
LatchedButton(uint8_t pin, uint8_t vbutton, bool pullup = true, Mux* mux = NULL, bool analog_only = false);
|
||||
bool Update(Joystick* js);
|
||||
|
||||
protected:
|
||||
|
@ -68,7 +68,7 @@ class LatchedButton : public SwitchButton {
|
|||
|
||||
class PulsedButton : public SwitchButton {
|
||||
public:
|
||||
PulsedButton(uint8_t pin, uint8_t vbutton, bool double_action = false, bool split = false, bool pullup = true, Mux* mux = NULL);
|
||||
PulsedButton(uint8_t pin, uint8_t vbutton, bool double_action = false, bool split = false, bool pullup = true, Mux* mux = NULL, bool analog_only = false);
|
||||
bool Update(Joystick* js);
|
||||
void ReleaseButtons(Joystick* js);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue