The task that runs is called ‘OutakeUntil’, I initialize it globally here:
int outtakeUntil(){
while(1){
if(!(spitBall == Tower::BALL::BLUE && Config.Optical.color() == color::red ) && !(spitBall == Tower::BALL::RED && Config.Optical.color() == color::blue)){
tower.spin(127,spitBall);
intakes.spin(127);
}else{
tower.stop();
}
task::sleep(10);
}
}
task OutakeUntil(outtakeUntil);
I’ve tried to stop it from running by placing a suspend command as the first thing in main but it doesn’t work.
I’m not very sure where to start looking but if you have any ideas about what could be wrong, I can post the appropriate code.