Go to Post You can never go wrong by gaining height by way of a Segway. - Elgin Clock [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 26-01-2017, 16:43
ebernerrd ebernerrd is offline
Registered User
FRC #3236
 
Join Date: Jan 2017
Location: Franklin, MA
Posts: 8
ebernerrd is an unknown quantity at this point
SendableChoosers are causing me grief!

Hello! My name is Eric, and I am the lead programmer for team 3236. This is my first year, and so far, things are going good!

I am attempting to add radio buttons to my SmartDashboard so that I can choose the autonomous mode to run at a specific time. I am running it through a Command based system, as it seemed the easiest and most logical to my head.

In Eclipse, functions like "AddDefault" or "AddObject" do not work when written like this:
Code:
private:
		Teleop *TeleopControls;
		SendableChooser<Command *> *autonomouschooser;
		Command *autonomousCommand;



		virtual void RobotInit() override {
			autonomouschooser->AddDefault("Basic Auto", new AutoDefault());
			SmartDashboard::PutData("Chooser", autonomouschooser);
		}
However, Eclipse recognizes these functions when the code is written as such:
Code:
private:
		Teleop *TeleopControls;
		SendableChooser *autonomouschooser;
		Command *autonomousCommand;



		virtual void RobotInit() override {
			autonomouschooser->AddDefault("Basic Auto", new AutoDefault());
			SmartDashboard::PutData("Chooser", autonomouschooser);
		}
In this case, I get the error "invalid use of template-name 'frc::SendableChooser' without an argument list".

I know that this is not because of an issue of "AutoDefault()" not existing, or anything along those lines.

If anyone has a possible solution or explanation, we'd greatly appreciate it!

Thank you!
-Eric
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 04:17.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi