![]() |
SendableChooser changes and errors
It appears that SendableChooser is now a template based class. Is there any documentation on how to use it?
We made some changes to use it as: Code:
SendableChooser<int> *pChoice;Code:
int ch = pChoice->GetSelected();Code:
int ch = (int)pChoice->GetSelected();Code:
arm-frc-linux-gnueabi-g++ -std=c++1y -I/Users/rwolff/wpilib/cpp/current/include -I/Users/rwolff/dev/robotics/FRCTeam1967/code/NatSndChTestJig/src -I/Users/rwolff/dev/robotics/FRCTeam1967/code/include -I/Users/rwolff/wpilib/user/cpp/include -O0 -g3 -Wall -c -fmessage-length=0 -o src/Robot.o ../src/Robot.cpp Thanks! roboBob |
Re: SendableChooser changes and errors
http://wpilib.screenstepslive.com/s/...smartdashboard shows how to use it with an object. Personally, I think SendableChooser is overkill for basic types that are supported by SmartDashboard, and would just use the SmartDashboard methods.
|
Re: SendableChooser changes and errors
Quote:
|
Re: SendableChooser changes and errors
Joe - thanks for the pointer. I'll take a look at it working with an object instead of a int, but that seems a bug to me if it only works with objects. As for your statement about overkill ... this is being used for picking an autonomous 'mode' prior to match start ... how can you utilize SmartDashboard to do that? I don't see any way to choose from a list or a set of radio buttons or just buttons to do that.
Euhlmann - while I understand the error notes the different types, this is a template class now and as such, looking at the definition of GetSelected() shows that the type "T" of the template is used as the return type for that function. I templated it with <int> and yet the return of GetSelected() isn't returning that int. roboBob |
Re: SendableChooser changes and errors
BTW, I did get a good clean compile by changing the template type from<int> to <int*>. Seems a deficiency of the template class to me, but it compiled at least.
|
| All times are GMT -5. The time now is 13:31. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi