Go to Post Come on baby, do the logomotion with me. - JaneYoung [more]
Home
Go Back   Chief Delphi > Technical > Programming
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
  #6   Spotlight this post!  
Unread 08-16-2016, 07:32 AM
azaclauson azaclauson is offline
Registered User
FRC #5593
 
Join Date: Jul 2016
Location: Tasmania
Posts: 17
azaclauson is an unknown quantity at this point
Re: Set Driver Station Autonomous Mode Options & Commands

Thanks for the tips.

I can successfully set the string, button and slider fields on the Driver Station "Basic" tab, code snippet below. I haven't been able to find a way to set the options on the chooser on the "Drive" tab. Is that meant to be possible from the robot code or is it only possible by building a custom Driver Station app with LabView?

Code:
SendableChooser *chooser;
const std::string autoNameDefault = "Default";
const std::string autoNameCustom = "My Auto";

void RobotInit()
{
         // These work.
	SmartDashboard::PutString("DB/String 0", "33");
	SmartDashboard::PutBoolean("DB/Button 1", true);
	SmartDashboard::PutNumber("DB/Slider 0", 3.58);

        // This doesn't work.
	chooser = new SendableChooser();
	chooser->AddDefault(autoNameDefault, (void*)&autoNameDefault);
	chooser->AddObject(autoNameCustom, (void*)&autoNameCustom);
	//SmartDashboard::PutData("Auto Modes", chooser);
	SmartDashboard::PutData("DB/Auto Modes", chooser);
}
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 09:22 AM.

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