diff --git a/connect_switch.ino b/connect_switch.ino index cfd4c98..6732c8f 100644 --- a/connect_switch.ino +++ b/connect_switch.ino @@ -39,18 +39,7 @@ void perms() { } index = (index + 1) % 40; } -/* -void button() { - if (state == 0) { - SwitchControlLibrary().PressButtonA(); - state = 1; - } - else { - SwitchControlLibrary().ReleaseButtonA(); - state = 0; - } -} -*/ + void setupButton(ButtonInfo *but, int pinNumber, Button buttonSymbol) { but->pinNumber = pinNumber; @@ -79,19 +68,6 @@ void setup() setupButton(&(buttonInfoTable[7]), 19, Button::CAPTURE); setupButton(&(buttonInfoTable[8]), 14, Button::MINUS); -/* - bButton.pinNumber = 3; - pinMode(bButton.pinNumber, INPUT_PULLUP); - bButton.prev = 1; - bButton.current = 1; - - plusButton.pinNumber = 15; - pinMode(plusButton.pinNumber, INPUT_PULLUP); - plusButton.prev = 1; - plusButton.current = 1; -*/ - - pinMode(2, INPUT_PULLUP); arrowTable[0].pinNumber = 6; @@ -104,7 +80,6 @@ void setup() arrowTable[i].state = 1; } - } void handleButtonInput(ButtonInfo *but){ @@ -133,35 +108,9 @@ void loop() prevVal = val; -for(int i=0; i