Go to Post "automated chaos" nuff said. - Jferrante [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
  #4   Spotlight this post!  
Unread 12-21-2015, 10:43 PM
Yanglin501st's Avatar
Yanglin501st Yanglin501st is offline
Registered User
AKA: Yang Lin
FRC #3044 (OxBe4)
Team Role: Programmer
 
Join Date: Oct 2014
Rookie Year: 2008
Location: New York
Posts: 3
Yanglin501st is an unknown quantity at this point
Re: Problem with WPI Library

Quote:
Originally Posted by euhlmann View Post
Try rebuilding the C++ Index. Right click on your project > index > rebuild
^I tried rebuilding the C++ Index like you said and nothing changed.

Quote:
Originally Posted by ozrien View Post
Also I'm not sure that is valid C++ (unless C++11 allows constructor params to be specified like that now and I didn't know).

Try to follow the example in the Talon SRX Software Reference manual section 3.4.
http://www.ctr-electronics.com/contr...ical_resources
...and since you are using CANTalons, you probably should look through the manual for help and examples.
^I went through the reference manual and tried to mimic the example code provided. As a result, it fixed the current error but I now have yellow squiggly underline under a part of my code and I'm not sure what it means.

Code:
class Robot: public IterativeRobot
{
	CANTalon motor;
	Joystick joy;
	LiveWindow *lw;

public:
	Robot () : motor(1),
			joy(1)
	{
	}

	void RobotInit()
	{
		lw = LiveWindow::GetInstance();
	}

	void TeleopPeriodic()
	{
		double leftAxis = joy.GetY(Joystick::kLeftHand);
		motor.Set(leftAxis);
	}

	void TestPeriodic()
	{
		lw->Run();
	}
};
This was what it displayed:
"Multiple markers at this line
- Line breakpoint: Robot.cpp [line: 8]
- Member 'lw' was not initialized in this
constructor"

Thanks for the help so far, I've only programmed Java for a year and I'm still trying to understand C++ for this year's robot!
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 10:48 AM.

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