From 5dfcbd9c92f874de17f45106f25b01f7824bdc43 Mon Sep 17 00:00:00 2001 From: Adam Long Date: Fri, 20 Mar 2015 13:11:23 +0000 Subject: [PATCH] Added reverse drive button --- Commands/Drivetrain/Drive.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Commands/Drivetrain/Drive.cpp b/Commands/Drivetrain/Drive.cpp index 692753b..93d0e44 100644 --- a/Commands/Drivetrain/Drive.cpp +++ b/Commands/Drivetrain/Drive.cpp @@ -18,6 +18,10 @@ void Drive::Execute(){ // y=0; //} //X axis, Y axis, Z axis, sensitivity, speed threshold (usually throttle) + if(DentRobot::oi->GetLeftStick()->GetRawButton(11)){ + x = -x; + y = -y; + } DentRobot::drivetrain->DriveMecanum(x, y, z, 0.9); } bool Drive::IsFinished(){