Update SampleRobot template to match comments (#768)

This commit is contained in:
sciencewhiz
2017-12-02 23:28:52 -08:00
committed by Peter Johnson
parent 52eba45c51
commit 0b8d3f0260
2 changed files with 11 additions and 11 deletions

View File

@@ -44,21 +44,21 @@ public:
/*
* This autonomous (along with the chooser code above) shows how to
* select
* between different autonomous modes using the dashboard. The sendable
* chooser code works with the Java SmartDashboard. If you prefer the
* LabVIEW Dashboard, remove all of the chooser code and uncomment the
* GetString line to get the auto name from the text box below the Gyro.
* select between different autonomous modes using the dashboard. The
* sendable chooser code works with the Java SmartDashboard. If you
* prefer the LabVIEW Dashboard, remove all of the chooser code and
* uncomment the GetString line to get the auto name from the text box
* below the Gyro.
*
* You can add additional auto modes by adding additional comparisons to
* the
* if-else structure below with additional strings. If using the
* the if-else structure below with additional strings. If using the
* SendableChooser make sure to add them to the chooser code above as
* well.
*/
void Autonomous() {
std::string autoSelected = frc::SmartDashboard::GetString(
"Auto Selector", kAutoNameDefault);
std::string autoSelected = m_chooser.GetSelected();
// std::string autoSelected = frc::SmartDashboard::GetString(
// "Auto Selector", kAutoNameDefault);
std::cout << "Auto selected: " << autoSelected << std::endl;
if (autoSelected == kAutoNameCustom) {
@@ -67,7 +67,7 @@ public:
m_robotDrive.SetSafetyEnabled(false);
// spin at half speed for two seconds
m_robotDrive.ArcadeDrive(0.0, 1.0);
m_robotDrive.ArcadeDrive(0.0, 0.5);
frc::Wait(2.0);
// stop robot