Go to Post The programmers will kill you if you want that done on the robot!!! - cbeavers6790 [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 05-03-2015, 20:32
arichman1257's Avatar
arichman1257 arichman1257 is offline
VP, Control Systems Captain, Coach
AKA: Alan Richman
FRC #1257 (Parallel Universe)
Team Role: Electrical
 
Join Date: Dec 2014
Rookie Year: 2014
Location: Fanwood
Posts: 21
arichman1257 is on a distinguished road
Use of SmartDashboard::GetString()

I have to take input from the driver station in form of a string for use of switching between auto modes. Then I need to take said string and execute the auto mode accordingly. Something like the following:

Code:
string autoMode = *input from driver station*;

if (autoMode == ctrs)
{
   *auto code*;
}
else if (autoMode == rs)
{
   *other auto code*;
}
else if (autoMode == crs)
{
   *even more auto code*
}
else if (autoMode == no)
{
   *final auto code*;
}
else
   *do nothing*;
So what I need is an example of how to get a string from the driver station using the SmartDashboard::GetString().

Thanks!!!

ps the ctrs, rs, etc are the short hand names for our auto modes.
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 03:32.

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