mirror of
https://github.com/team2059/Zaphod
synced 2024-12-18 20:12:28 -05:00
Added a joystick update function for later use when implementing multiple joystick support (different models of joysticks)
This commit is contained in:
parent
7d276da7a9
commit
a5a4891649
16
MyRobot.cpp
16
MyRobot.cpp
@ -263,6 +263,22 @@ public:
|
||||
}
|
||||
}
|
||||
//}}}
|
||||
//{{{updateJoystick
|
||||
bool* updateJoystick(int joystick){
|
||||
if(joystick==1){
|
||||
for(i=1,i<=12,i++){
|
||||
state[joystick][i] = Lstick.GetRawButton(i);
|
||||
}
|
||||
return state;
|
||||
}
|
||||
if(joystick==2){
|
||||
for(i=1,i<=12,i++){
|
||||
state[joystick][i] = Rstick.GetRawButton(i);
|
||||
}
|
||||
return state;
|
||||
}
|
||||
}
|
||||
//}}}
|
||||
//Autonomous{{{
|
||||
void Autonomous(){
|
||||
//Initializations{{{
|
||||
|
Loading…
Reference in New Issue
Block a user