![]() |
Robot Builder Generating Code with Errors in it
I generated this code in Robot builder and then imported it into eclipse and hit build. The Code had errors in the robot.h file and the motor.h file (motor.h is in the subsystem folder as the only system I am currently trying to test)
robot.h: Code:
// RobotBuilder Version: 1.5Code:
static motor* motor;motor.h: Code:
// RobotBuilder Version: 1.5Code:
class motor: public Subsystem {I can tell that these errors are related and that if I resolve one it will probably resolve the other as well but I do not understand what is wrong and do not know what to do. Any help is appreciated. |
Re: Robot Builder Generating Code with Errors in it
RobotBuilder was designed with the naming conventions delineated here: https://wpilib.screenstepslive.com/s...s#!prettyPhoto
In particular, since your motor class is lower case rather then first letter upper case, it's trying to declare an instance variable with the same name as the class. Delete the motor.cpp and .h and change your subystem name to Motor and clean and rebuilt and it should work. In general, motor is probably not a good subsystem name. It should be tied to something unique and memorable piece of your robot, like DriveTrain, Arm, Stacker, or something like that. More ideas here: http://wpilib.screenstepslive.com/s/...ed-programming |
Re: Robot Builder Generating Code with Errors in it
Thank you that fixed it.
|
| All times are GMT -5. The time now is 09:52 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi