fixed remote PitHold, added persistant boardID
This commit is contained in:
@@ -6,17 +6,23 @@ void pollInput (){
|
||||
buttonPAUSE.poll();
|
||||
buttonPIT.poll();
|
||||
buttonRESET.poll();
|
||||
buttonTEAM.poll();
|
||||
|
||||
if (buttonSTART.pushed()) {
|
||||
buttonSTARTvar = true;
|
||||
}
|
||||
if (buttonPAUSE.pushed()) {
|
||||
buttonPAUSEvar = true;
|
||||
}
|
||||
if (buttonPIT.pushed()) {
|
||||
buttonPITvar = true;
|
||||
}
|
||||
if (buttonRESET.pushed()) {
|
||||
buttonRESETvar = true;
|
||||
// only set the var if the button was actually pushed or released, to prevent overriding data from the controller
|
||||
if (buttonSTART.singleClick() || buttonSTART.longPress() || buttonPAUSE.singleClick() || buttonPIT.singleClick() || buttonPIT.switched() || buttonRESET.longPress() || buttonTEAM.singleClick() || buttonTEAM.longPress()) {
|
||||
sendDATAvar = true;
|
||||
buttonSTARTvar = buttonSTART.singleClick();
|
||||
buttonSTARTforced = buttonSTART.longPress();
|
||||
buttonPAUSEvar = buttonPAUSE.singleClick();
|
||||
buttonPITvar = buttonPIT.singleClick();
|
||||
buttonPIThold = buttonPIT.on();
|
||||
buttonRESETvar = buttonRESET.longPress();
|
||||
if (boardID == 1) {
|
||||
buttonREDTEAMvar = buttonTEAM.singleClick();
|
||||
buttonREDTEAMtapout = buttonTEAM.longPress();
|
||||
} else if (boardID == 2) {
|
||||
buttonBLUETEAMvar = buttonTEAM.singleClick();
|
||||
buttonBLUETEAMtapout = buttonTEAM.longPress();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user