Go to Post Some people use Autodesk, some SolidWorks, some Pro-E, but 772 rose to the call of an unconventional CAD language, Minecraft. - Walter Deitzler [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 31-03-2016, 16:13
whitetail's Avatar
whitetail whitetail is offline
Registered User
FRC #5407 (Wolf Pack)
Team Role: Operator
 
Join Date: Dec 2014
Rookie Year: 2014
Location: Philadelphia
Posts: 48
whitetail is an unknown quantity at this point
Help: Auto selector

We have multiple auto programs and we have to switch them in the code but would like to select them on smart dashboard. We are coding in Java and writing our code in the Iterative style. Any help would be appreciated!
__________________
FRC Team 5407 -Driver, Programmer and Head Control Systems Engineer
2015 MAR Championship Rookie All Star Award
2015 MAR Hatboro-Horsham District Rookie All Star Award
2015 MAR Hatboro-Horsham District event Winner(Thanks 2590, 2607)
Reply With Quote
  #2   Spotlight this post!  
Unread 31-03-2016, 21:23
Pault's Avatar
Pault Pault is offline
Registered User
FRC #0246 (Overclocked)
Team Role: College Student
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Boston
Posts: 618
Pault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond repute
Re: Help: Auto selector

https://wpilib.screenstepslive.com/s...smartdashboard

The example they give adds Commands to the SendableChooser. However, because you are using iterative, you can put a number or a String or an enum or something in place of where it has "new Pickup ()" and "new ElevatorPickup", and then getSelected () will return that numbwr/whatever associated with the selected option, so you can use that in an if statement to decide which Auton you want to run.
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 09:08.

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