![]() |
Robotbuilder c++ code dies in Test Mode
Finally got example robot programs to run after Plugin update. Thanx.
Now I tried the most simple RobotBuilder C++ code (one subsystem with one speed controller). exported, imported, built and deployed OK. When I select Test Mode then enable. The Drivers Station indicates Test Enabled for 1/2 second, then Test Disabled. The roborio Mode indicator goes Red, then Comm indicator Red, then Mode goes off and Comm goes back to green. |
Re: Robotbuilder c++ code dies in Test Mode
I've duplicated this. It has to do with the way the SpeedController object is cast to the
Here's the code that causes the crash: Code:
lw->AddActuator("Subsystem 1", "Speed Controller 1", (Talon&)subsystem1SpeedController1);Code:
lw->AddActuator("Subsystem 1", "Speed Controller 1", std::static_pointer_cast<Talon>(subsystem1SpeedController1)); |
Re: Robotbuilder c++ code dies in Test Mode
Quote:
Quote:
|
Re: Robotbuilder c++ code dies in Test Mode
Quote:
Code:
#include "RobotMap.h" |
Re: Robotbuilder c++ code dies in Test Mode
Thanks, that worked for me.
|
I submitted a patch for review for this for Robot Builder.
|
Re: Robotbuilder c++ code dies in Test Mode
How do I find out when or if Robot Builder gets revised?
|
Re: Robotbuilder c++ code dies in Test Mode
New software releases are mentioned in team updates, or you can watch one of these pages on screensteps: http://wpilib.screenstepslive.com/s/...ware-revisions or http://wpilib.screenstepslive.com/s/...ugin-changelog
|
Re: Robotbuilder c++ code dies in Test Mode
I think there's an eminent release of the eclipse plugins including robot builder with this fix. However, in the meantime, here's a version with the fix.
Edit: see version below. |
Re: Robotbuilder c++ code dies in Test Mode
Did a quick test and it works. Thanx a lot...
|
Re: Robotbuilder c++ code dies in Test Mode
Still have problem with the most simple c++ program built with new Robot Builder (one generic subsystem with one motor actuator).
old robot builder std::shared_ptr<SpeedController> RobotMap::subsystem1SpeedController1; // <<< this is ok lw->AddActuator("Subsystem 1", "Speed Controller 1", (Talon&) subsystem1SpeedController1); // <<< this caused Test Mode to abort new robot builder static std::shared_ptr<SpeedController> subsystem1SpeedController1; // <<< this causes a build error lw->AddActuator("Subsystem 1", "Speed Controller 1", std::static_pointer_cast<Talon>(subsystem1SpeedCon troller1)); // <<< this is OK |
Re: Robotbuilder c++ code dies in Test Mode
1 Attachment(s)
Try this version
|
Re: Robotbuilder c++ code dies in Test Mode
Quote:
Thanx |
| All times are GMT -5. The time now is 09:12 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi