Go to Post Gracious Professionalism is being embarrassed at an event by an underperforming catstrophe of a robot, yet standing and applauding for every award because you realize that as hard as you worked that season, the other team must have worked even harder to get their achievements. - Taylor [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

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 05-08-2016, 07:45
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Set Driver Station Autonomous Mode Options & Commands

If you are talking about having the default dashboard supply parameters to your auto, the basic tab has a handful of numeric sliders and strings that the driver can set and the robot's auto read. You can modify the name of the controls by setting other Network Table variables from your robot. You can persist these by going to the Variable tab and double clicking on the variables that you want to retain their value from match to match. If you want a constant default value for them, the robot can set the variables once, but then allow the driver to update them.

And as others have said, the dashboard is just a program. In fact the default dashboard is just an exe built from the LV template dashboard.

Greg McKaskle
Reply With Quote
  #2   Spotlight this post!  
Unread 16-08-2016, 07:32
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
  #3   Spotlight this post!  
Unread 21-08-2016, 08:29
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Set Driver Station Autonomous Mode Options & Commands

The auto selector shows the value of the "Auto List" string array. It should be pretty easy to set it in some initializers so that valid autos show up in the list, always consistent with the code. If you would rather have it come from file, you can use a persisted NT variable.

And of course, you can also make a custom dashboard if you want another means of selecting.

Greg McKaskle
Reply With Quote
Reply


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 23:42.

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