Hello!
We are requesting help with getting our pneumatics running in driver control (we recently switched over to visual studio code). Here is the code:
// mobile goal clamp
if(controller(primary).ButtonY.pressing() && GOALCLAMP == 0){
GOALCLAMP = 1;
if(MOBILEGOAL1.value()){
MOBILEGOAL1.set(false);
MOBILEGOAL2.set(false);
}
else{
MOBILEGOAL1.set(true);
MOBILEGOAL2.set(true);
}
}else if(controller(primary).ButtonY.pressing() == false && GOALCLAMP == 1){
GOALCLAMP = 0;
}
}
//Test Clamp
//Doink code
if(controller(primary).ButtonRight.pressing() && LDOINK == 0){
LDOINK = 1;
if(LEFTDOINK.value()){
LEFTDOINK.set(false);
}
else{
LEFTDOINK.set(true);
}
}
//else if(controller(primary).ButtonRight.pressing() == false && LDOINK == 1){
//LDOINK = 0;
//}
//if(controller(primary).ButtonY.pressing() && RDOINK == 0){
//RDOINK = 1;
// if(RIGHTDOINK.value()){
// RIGHTDOINK.set(false);
// }else{
// RIGHTDOINK.set(true);
// }
//}else if(controller(primary).ButtonY.pressing() == false && RDOINK == 1){
//RDOINK = 0;
//}
//Arm code
if(controller(primary).ButtonL1.pressing() && ARM == 0){
ARM = 1;
if(LEFTARM.value()){
LEFTARM.set(false);
RIGHTARM.set(false);
}
else{
LEFTARM.set(true);
RIGHTARM.set(true);
}
}else if(controller(primary).ButtonL1.pressing() == false && ARM == 1){
ARM = 0;
}
}
Can anyone tell us what we may have done wrong? Thank you!
edit: code tags added by mods, please remember to use them (block quote generally does not work for code)