diff --git a/wpilibcExamples/src/main/cpp/templates/sample/Robot.cpp b/wpilibcExamples/src/main/cpp/templates/sample/Robot.cpp index 34c7253a03..ea4697c58d 100644 --- a/wpilibcExamples/src/main/cpp/templates/sample/Robot.cpp +++ b/wpilibcExamples/src/main/cpp/templates/sample/Robot.cpp @@ -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 diff --git a/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/templates/sample/Robot.java b/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/templates/sample/Robot.java index 9b64e47d93..beac9cffd5 100644 --- a/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/templates/sample/Robot.java +++ b/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/templates/sample/Robot.java @@ -99,7 +99,7 @@ public class Robot extends SampleRobot { switch (autoSelected) { case kCustomAuto: m_robotDrive.setSafetyEnabled(false); - m_robotDrive.arcadeDrive(-0.5, 1.0); // spin at half speed + m_robotDrive.arcadeDrive(0.0, 0.5); // spin at half speed Timer.delay(2.0); // for 2 seconds m_robotDrive.arcadeDrive(0.0, 0.0); // stop robot break;