View Single Post
  #3   Spotlight this post!  
Unread 01-02-2015, 13:58
thatprogrammer's Avatar
thatprogrammer thatprogrammer is offline
Registered User
AKA: Ahad Bawany
no team (None)
Team Role: Programmer
 
Join Date: Apr 2014
Rookie Year: 2014
Location: Florida
Posts: 609
thatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond repute
Re: RoboRIO red comm light, not accepting code?

Commenting out the auto code I had added fixed the red comm light. Does anyone mind reading through the code to see what might be causing the error?
Code:
void AutonomousInit()
	{

		//gyro->Reset();
	}

	void AutonomousPeriodic()
	{

/*
	SmartDashboard::PutNumber("Gyro Angle:", Angle);
if (automode == 1)
{
	gyro->GetAngle();
{
	if (Angle == 90)
	{
		robottime = false;
	} else {
		robottime = true;
	}
}
if(robottime == true)
{
	robot->Drive(0,-1);
}
if (robottime == false)
{
	robot->Drive(0,-1);
}
}
if (automode == 2)
{
	gyro->GetAngle();
	if (Angle == 45)
	{
		robottime = false;
	} else {
		robottime = true;
	}
	if (robottime == true)
	{
		robot->Drive(0, -.5);
	}
	if (robottime == false)
	{
		robot->Drive(0,0);
	}
}
*/
}
is using a selector based on joystick button during robotinit causing this?
Reply With Quote