Quote:
Originally Posted by Ether
Are you using Simple Robot or Iterative Robot ?
What other code do you have in autonomous besides what you posted ?
|
Iterative.
Code:
void AutonomousContinuous(void) {
printf("Running in autonomous continuous...\n");
GetWatchdog().Feed();
if (kicker->HasBall())
{
//We have a ball, thus stop moving and kick the ball
drivetrain->Drive(0.0, 0.0);
kicker->SetKickerMode(KICKER_MODE_KICK);
} else {
//We do not have a ball
if (kicker->IsKickerInPosition())
{
//Move forward!
drivetrain->ArcadeDrive(autonomousForwardPower, 0.0);
} else {
//If not in position, wait for it to be there...
drivetrain->ArcadeDrive(0.0, 0.0);
kicker->SetKickerMode(KICKER_MODE_ARM);
}
}
//Run the kicker
kicker->Act();
}
-Tanner