Go to Post Not even close to ready...can we delay it till like...January 2010? - Cory [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 10-31-2016, 11:28 AM
RyZeRun RyZeRun is offline
Registered User
FRC #4104
 
Join Date: Oct 2016
Location: Spokane, WA
Posts: 4
RyZeRun is an unknown quantity at this point
"Getting Started" Errors

I created a WPILib example file, "Getting Started". This is my code:

Code:
#include "WPILib.h"

class Robot: public IterativeRobot
{

	RobotDrive myRobot; // robot drive system
	Joystick stick; // only joystick
	LiveWindow *lw;
	int autoLoopCounter;

public:
	Robot() :
		myRobot(0, 1),	// these must be initialized in the same order
		stick(0),		// as they are declared above.
		lw(LiveWindow::GetInstance()),
		autoLoopCounter(0)
	{
		myRobot.SetExpiration(0.1);
	}

private:
	void AutonomousInit()
	{
		autoLoopCounter = 0;
	}

	void AutonomousPeriodic()
	{
		if(autoLoopCounter < 100) //Check if we've completed 100 loops (approximately 2 seconds)
		{
			myRobot.Drive(-0.5, 0.0); 	// drive forwards half speed
			autoLoopCounter++;
			} else {
			myRobot.Drive(0.0, 0.0); 	// stop robot
		}
	}

	void TeleopInit()
	{

	}

	void TeleopPeriodic()
	{
		myRobot.ArcadeDrive(stick); // drive with arcade style (use right stick)
	}

	void TestPeriodic()
	{
		lw->Run();
	}
};

START_ROBOT_CLASS(Robot)
I get five errors:

- Program "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\cl" not found in PATH

- The type 'Joystick' must implement the inherited pure virtual method 'GenericHID::GetPOV' In line 7

- The type 'Joystick' must implement the inherited pure virtual method 'GenericHID::GetRawAxis' In line 7

- The type 'Joystick' must implement the inherited pure virtual method 'GenericHID::GetRawButton' In line 7

- The type 'RobotDrive' must implement the inherited pure virtual method 'MotorSafety::GetDescription' In line 6

Also, 'START_ROBOT_CLASS(Robot)' has a syntax error.

How can I fix these errors?
Reply With Quote
 


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 08:25 PM.

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