cosmetic change
This commit is contained in:
@@ -39,18 +39,7 @@ void perms() {
|
|||||||
}
|
}
|
||||||
index = (index + 1) % 40;
|
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) {
|
void setupButton(ButtonInfo *but, int pinNumber, Button buttonSymbol) {
|
||||||
but->pinNumber = pinNumber;
|
but->pinNumber = pinNumber;
|
||||||
@@ -79,19 +68,6 @@ void setup()
|
|||||||
setupButton(&(buttonInfoTable[7]), 19, Button::CAPTURE);
|
setupButton(&(buttonInfoTable[7]), 19, Button::CAPTURE);
|
||||||
setupButton(&(buttonInfoTable[8]), 14, Button::MINUS);
|
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);
|
pinMode(2, INPUT_PULLUP);
|
||||||
|
|
||||||
arrowTable[0].pinNumber = 6;
|
arrowTable[0].pinNumber = 6;
|
||||||
@@ -104,7 +80,6 @@ void setup()
|
|||||||
arrowTable[i].state = 1;
|
arrowTable[i].state = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void handleButtonInput(ButtonInfo *but){
|
void handleButtonInput(ButtonInfo *but){
|
||||||
@@ -133,35 +108,9 @@ void loop()
|
|||||||
prevVal = val;
|
prevVal = val;
|
||||||
|
|
||||||
|
|
||||||
for(int i=0; i<ButtonInfoTableSize; i++){
|
for(int i=0; i<ButtonInfoTableSize; i++){
|
||||||
handleButtonInput(&(buttonInfoTable[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++){
|
for (int i=0; i<4; i++){
|
||||||
|
|||||||
Reference in New Issue
Block a user