Thread: Autonomous
View Single Post
  #1   Spotlight this post!  
Unread 02-07-2016, 02:42 PM
alexusaywla alexusaywla is offline
Registered User
AKA: Alexus
FRC #6155 (ElektraBots)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2016
Location: San Antonio, TX
Posts: 13
alexusaywla is an unknown quantity at this point
Autonomous

I have some code written for autonomous but when I deploy the code nothing happens. Why is this? Can someone please tell me what I need to include or provide an example?

void RobotInit()
{
SmartDashboard:utNumber("auton", 0);
}


void Autonomous()
{
autonomous = SmartDashboard::GetNumber("auton", 0);

if(autonomous == 1)
{
cout << "ONE!";
Robot.SetSafetyEnabled(false);
Robot.Drive(0.5, 0);
Wait(2);
Robot.Drive(0, 0);

}
else if(autonomous == 2)
{
cout << "TWO!";
}
else{cout << "NONE!";}
}


void OperatorControl()
{
Reply With Quote