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.