cosmetic change

This commit is contained in:
2020-09-14 01:30:08 +09:00
parent ca5fd1ae18
commit ee5ef7a696

View File

@@ -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){
@@ -137,32 +112,6 @@ for(int i=0; i<ButtonInfoTableSize; i++){
handleButtonInput(&(buttonInfoTable[i]));
}
/*
bButton.current = digitalRead(bButton.pinNumber);
if(bButton.prev == 1 && bButton.current ==0 ){
SwitchControlLibrary().PressButtonB();
}
else if(bButton.prev == 0 && bButton.current ==1 ) {
SwitchControlLibrary().ReleaseButtonB();
}
bButton.prev = bButton.current;
plusButton.current = digitalRead(plusButton.pinNumber);
if(plusButton.prev == 1 && plusButton.current ==0 ){
SwitchControlLibrary().PressButtonPlus();
}
else if(plusButton.prev == 0 && plusButton.current ==1 ) {
SwitchControlLibrary().ReleaseButtonPlus();
}
plusButton.prev = plusButton.current;
*/
for (int i=0; i<4; i++){
arrowTable[i].state = digitalRead(arrowTable[i].pinNumber);