//Choose which auto to use void AutonomousInit() { chainLift.SetSpeed(0); canGrabber.SetSpeed(0); robotDrive.MecanumDrive_Cartesian(0, 0, 0); SmartDashboard::PutString("STATUS:", "STARTING AUTO"); robotDrive.SetSafetyEnabled(false); chainLift.SetSafetyEnabled(false); SmartDashboard::PutBoolean("Auto switch A: ", autoSwitch1.Get()); SmartDashboard::PutBoolean("Auto switch B: ", autoSwitch2.Get()); //Select auto type if (autoSwitch1.Get()) { if (autoSwitch2.Get()) AutonomousType4(); else //1 on 2 grab n back AutonomousType8(); } else { if (autoSwitch2.Get()) //1 off, 2 on: grab n turn AutonomousType10(); else { SmartAutoPicker(); } //Do Nothing } }
//---------------------------- TELEOP ---------------- MECANUM WITH JOYSTICKS AND CHAINLIFT --------------- void TeleopInit() { robotDrive.SetSafetyEnabled(false); chainLift.SetSafetyEnabled(false); tick = 0; SmartDashboard::PutString("STATUS:", "TELEOPERATED"); }