Quote:
Originally Posted by euhlmann
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
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!