23 lines
856 B
C++
23 lines
856 B
C++
// handle all the inputs, set vars, etc.
|
|
|
|
void pollInput (){
|
|
// poll all the switch/button inputs
|
|
buttonSTART.poll();
|
|
buttonPAUSE.poll();
|
|
buttonPIT.poll();
|
|
buttonRESET.poll();
|
|
switchRUMBLE.poll();
|
|
switchPIT.poll();
|
|
switchLIGHT.poll();
|
|
switchTESTmode.poll();
|
|
|
|
// only set the var if the button was actually pushed or released, to prevent overriding data from the remote
|
|
if (buttonSTART.singleClick() || buttonSTART.longPress() || buttonPAUSE.singleClick() || buttonPIT.singleClick() || buttonPIT.switched() || buttonRESET.longPress()) {
|
|
buttonSTARTvar = buttonSTART.singleClick();
|
|
buttonSTARTforced = buttonSTART.longPress();
|
|
buttonPAUSEvar = buttonPAUSE.singleClick();
|
|
buttonPITvar = buttonPIT.singleClick();
|
|
buttonPIThold = buttonPIT.on();
|
|
buttonRESETvar = buttonRESET.longPress();
|
|
}
|
|
} |