|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Problem calling START_ROBOT_CLASS(_CLASSNAME_) Wrapper
I'm having trouble calling my wrapper - it hasn't happened before. Here's the code that has been reduced to purely illustrate the problem.
Code:
//Atlas.h
#include "WPILib.h"
class Atlas: public SampleRobot {
Gyro* gyro; //just some filler here
public:
Atlas();
~Atlas();
void Autonomous();
void OperatorControl();
void Test();
};
Code:
//Atlas.cpp
#include "Atlas.h"
Atlas::Atlas() {
gyro = new Gyro(1);
}
Atlas::~Atlas() {
delete gyro;
}
void Atlas::Autonomous() { }
void Atlas::OperatorControl() { }
void Atlas::Test() { }
Code:
//initialize.cpp #include "Atlas.h" START_ROBOT_CLASS(Atlas); //error here Quote:
help? Last edited by vps : 11-01-2015 at 14:54. |
|
#2
|
|||
|
|||
|
Re: Problem calling START_ROBOT_CLASS(_CLASSNAME_) Wrapper
What happens if you try to deploy it? I believe that's an error with the internal eclipse compiler, and your code will actually compile.
|
|
#3
|
|||
|
|||
|
Re: Problem calling START_ROBOT_CLASS(_CLASSNAME_) Wrapper
Note how the problem persists when everything is consolidated in one file:
Code:
//Atlas.cpp
#include "WPILib.h"
class Atlas: public SampleRobot {
Gyro* gyro; //just some filler here
public:
Atlas() {
gyro = new Gyro(1);
}
~Atlas() {
delete gyro;
}
void Autonomous() { };
void OperatorControl() { };
void Test() { };
};
START_ROBOT_CLASS(Atlas); //same error here
|
|
#4
|
|||
|
|||
|
Re: Problem calling START_ROBOT_CLASS(_CLASSNAME_) Wrapper
I have not tried to deploy this since it cannot even properly build. Right now, I'm at home so I cannot try that. Any other suggestions?
|
|
#5
|
|||
|
|||
|
Re: Problem calling START_ROBOT_CLASS(_CLASSNAME_) Wrapper
What I'm saying is that the internal eclipse builder thinks that's an error, but it's not. It should deploy properly when you connect to the roboRIO.
|
|
#6
|
|||
|
|||
|
Re: Problem calling START_ROBOT_CLASS(_CLASSNAME_) Wrapper
Thanks. I'll try it out on Monday. Has this happened to you before?
|
|
#7
|
|||
|
|||
|
Re: Problem calling START_ROBOT_CLASS(_CLASSNAME_) Wrapper
We've experienced this issue multiple times. You should be fine if you compile. If it's bugging you just delete the error from the console window and it should go away.
|
|
#8
|
||||
|
||||
|
Re: Problem calling START_ROBOT_CLASS(_CLASSNAME_) Wrapper
If you know you coded it right and its just the compiler saying you have an error, re-index it by right clicking on the project, scroll down to the index option and select rebuild. You'll only have the standard gcc and etc errors.
Last edited by mega900997 : 11-01-2015 at 20:42. |
|
#9
|
|||
|
|||
|
Re: Problem calling START_ROBOT_CLASS(_CLASSNAME_) Wrapper
x2
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|