![]() |
Subsystem::GetName() Doesn't Do What I Expect
Here's some code and expected versus actual results. I'm confident that WPILib would benefit from an update.
The Test Code Code:
MyRobot::RobotInit()After I compile this code and download it to the cRIO, I expect the DriverStationLCD to have a single line of text showing "MySubsystem". The Actual Result Instead, I see "Subsystem". If I change the name of the passed-in subsystem name to anything else, I always see "Subsystem" as the returned string. My Suspicion Subsystem::GetName() is returning a hard-coded value and not the user-provided name. Please provide an update to the WPILib that solves this problem :D |
Re: Subsystem::GetName() Doesn't Do What I Expect
Quote:
Code:
std::string Subsystem::GetName() |
Re: Subsystem::GetName() Doesn't Do What I Expect
Quote:
Just in case someone is interested, we implemented a workaround where we simply introduce another intermediate sub-class of Subsystem that extends the GetName() method and returns a local copy of the name. When the WPILib is updated to correct this issue, we will remove our intermediate class. |
Re: Subsystem::GetName() Doesn't Do What I Expect
The fastest way to get this fixed would be to report a bug in the WPILib Tracker and provide a patch.
|
Re: Subsystem::GetName() Doesn't Do What I Expect
Quote:
I would gladly contribute a patch, but I simply cannot become a member of the project. Bummer... |
Re: Subsystem::GetName() Doesn't Do What I Expect
The password strength requirements are VERY harsh. ALL of these are required in your password:
* Uppercase * Lowercase * Numeric * Non-numeric-non-alphabetic (symbols) bob |
Re: Subsystem::GetName() Doesn't Do What I Expect
Quote:
|
| All times are GMT -5. The time now is 17:42. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi