Go to Post Naw, basketball isn't nearly as great a sport as FRC. They play for the money. We play for honor, dignity, and respect. - synth3tk [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 07-02-2012, 19:17
msulaimain's Avatar
msulaimain msulaimain is offline
Registered User
AKA: Muhammad Sulaiman
FRC #3346 ([{Kamikaze Komets}])
Team Role: Programmer
 
Join Date: Mar 2010
Rookie Year: 2009
Location: USA
Posts: 36
msulaimain can only hope to improve
Send a message via AIM to msulaimain Send a message via Yahoo to msulaimain
Driver Station ERROR:

I'm the head coder for our team: 3346. I ran into this error today on the driver station:
Code:
ERROR: A timeout has been exceeded: RobotDrive...Output not updated often enough. ...in Check() in c:/Windriver/workspace/WPILib/MotorSafetyHelper.cpp at line 123
No Change to Network Configuration: "Local Area Connection""Wireless Network Connection"
I/O unit not detected or not installed correctly.
That is the error I receive on the driver station. The lights are green for robot communications and robot code but when I enable nothing works.

Here is my .cpp:

Code:
#include "WPILib.h"

class RobotDemo : public SimpleRobot 
{

RobotDrive myRobot;
Jaguar ballpicker;
Joystick leftStick; // left joystick in USB 1 of the DS
Joystick rightStick; // and right JS is in USB 2 of the DS
DriverStationLCD *display;
Solenoid sol1;
Solenoid sol2;
Compressor compress;

public:
	RobotDemo():
		myRobot(1,2), // Drive Motors
		
		ballpicker(3), // Motor That Picks Up Balls
		
		leftStick(1), 
		rightStick(2),
		
		sol1(7,1), // MIGHT HAVE TO CHANGE FIRST COORDINATE BECUASE MODULES-
		sol2(7,8), // HAVE CHANGED THIS YEAR!!!
		
		compress(1,1)

	{
		myRobot.SetExpiration(0.1);

		display = DriverStationLCD::GetInstance();
	}
	
	void Autonomous(void)
	{
		myRobot.SetSafetyEnabled(true); // Autonomous Period
		myRobot.Drive(0.6, 0.0);        // Drives Forward->Half Speed->2 Seconds.
		Wait(5.0);                      
		myRobot.Drive(0.0, 0.0);   
	}
	
	void OperatorControl(void)  
	{
		
			GetWatchdog().SetEnabled(true);
			compress.Start();                // Starts the Compressor
			while (IsOperatorControl()) 
			{
				GetWatchdog().Feed();
				myRobot.ArcadeDrive(leftStick); // Arcade Style--> Left Stick
		/*	
        char text[255];
        char text2[255];
        display->Clear();
        
				if(rightStick.GetTrigger())
				{
					  arm2.Set(0.9); //full speed if trigger is pressed
            sprintf(text, "Arm 2: 0.9");
            display->PrintfLine(DriverStationLCD::kUser_Line1, text);
				}
				else
				{
					  arm2.Set(0.0); //when trigger is not pressed, no power
            sprintf(text, "Arm 2: 0.0");
            display->PrintfLine(DriverStationLCD::kUser_Line1, text);
				}
				if (rightStick.GetRawButton(3))
				{
				          arm.Set(1.0); // full speed if trigger pressed
                  sprintf(text2, "Arm: 1.0");
                  display->PrintfLine(DriverStationLCD::kUser_Line2, text2);
				}
				else
				{
				 	  arm.Set(0.0); //no power if button 3 is not pressed
            sprintf(text2, "Arm: 0.0");
            display->PrintfLine(DriverStationLCD::kUser_Line2, text2);
				}

        display->UpdateLCD();
*/

		
		if (leftStick.GetRawButton(3))
		{
			ballpicker.Set(0.1); // --> If Button 3-->Input-->10% Power
		}
							
		else
		{
			ballpicker.Set(0.0); // --> If Button 3-->No Input-->No Power
		}                        // Left Stick Is For Driver/Ball Picker Up'er

        if(rightStick.GetTrigger()) // Right Stick Is For Shooter
        {
        	sol1.Set(true); // --> If Right Trigger-->Input-->Valve 1-->True
        	sol2.Set(false); // --> Valve 2-->False
        }
        else
        {
        	sol1.Set(false); // --> If Right Trigger-->No Input-->Valve 1-->False
        	sol2.Set(true); // --> Valve 2-->True
        }
        
				Wait(0.005);	// --> Allows Time for Motor Refresh/Update
			}
// COPYRIGHT MUHAMMAD SULAIMAN--> NO ONE MESSES WITH THE ZOHAN!
	}
};

START_ROBOT_CLASS(RobotDemo);
Please ignore the comments.

Thank You. Can someone please help me. I believe that my loop is being examined over and over again. Do I need a semicolon after while (IsOperatorControl()) I believe I do. I just didn't have time to add that today, but will try adding that and deploying code tomorrow since robotics just ended. But that thought hit me right after I left. Is that a solution? Or is it something else?
__________________
int main()
{
::::::::: include=>commitment;
::::::::: int=>school name=>Asheboro::High
::::::::: int=>team name=>Kamikaze::Komets;
::::::::: Priority_Queue=>FRC Championship::2012;
::::::::: Max_Element=>Teamwork;
}
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 02:34.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi