Pneumatics not working in autonomous

hi! we’re using a pneumatic reservoir for our claw. in our program we’ve defined it as a digital out device. our driver control code works perfectly but for some reason our autonomous doesn’t work at all, even though we’re using the same functions. here is our driver code:

if(clawGrab){
clawRes.set(true);
}
if(clawTract){
clawRes.set(false);
}

and here is the reservoir code in our autonomous (we have it stripped down to just these two lines so we can test why it’s not working):

void autonomous(void) {
clawRes.set(true);
clawRes.set(false);
}

as you can see it’s the exact same code so i don’t get why it works in one context and not the other, if you have any idea please let me know thanks

You may not be giving the pneumatics enough time to operate. try putting a wait statement in between the 2 calls in autonomous

6 Likes

omg i can’t believe i didn’t think of that :man_facepalming: tysm hahaha

1 Like