initial commit
This commit is contained in:
38
ROFLS_Arena_Controller/Input_Handler.ino
Normal file
38
ROFLS_Arena_Controller/Input_Handler.ino
Normal file
@@ -0,0 +1,38 @@
|
||||
// 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();
|
||||
buttonREDTEAM.poll();
|
||||
buttonBLUETEAM.poll();
|
||||
|
||||
if (buttonSTART.pushed()) {
|
||||
buttonSTARTvar = true;
|
||||
}
|
||||
if (buttonPAUSE.pushed()) {
|
||||
buttonPAUSEvar = true;
|
||||
}
|
||||
if (buttonPIT.pushed()) {
|
||||
buttonPITvar = true;
|
||||
}
|
||||
if (buttonRESET.pushed()) {
|
||||
buttonRESETvar = true;
|
||||
}
|
||||
if (buttonREDTEAM.pushed()) {
|
||||
buttonREDTEAMvar = true;
|
||||
if (ARENA_READY && !REDTEAM_READY) {
|
||||
BLINK_COUNTER_REDTEAM = 5;
|
||||
}
|
||||
}
|
||||
if (buttonBLUETEAM.pushed()) {
|
||||
buttonBLUETEAMvar = true;
|
||||
if (ARENA_READY && !BLUETEAM_READY) {
|
||||
BLINK_COUNTER_BLUETEAM = 5;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user