|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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);
}
Code:
private:
Teleop *TeleopControls;
SendableChooser *autonomouschooser;
Command *autonomousCommand;
virtual void RobotInit() override {
autonomouschooser->AddDefault("Basic Auto", new AutoDefault());
SmartDashboard::PutData("Chooser", autonomouschooser);
}
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 |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|