From 2ea5cf290085dc88a4a976c4e16fa7103f92d2b7 Mon Sep 17 00:00:00 2001 From: Adam Long Date: Tue, 22 Sep 2015 20:07:00 +0000 Subject: [PATCH] fixed drive --- Commands/Drivetrain/Drive.cpp | 2 +- Subsystems/Drivetrain.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Commands/Drivetrain/Drive.cpp b/Commands/Drivetrain/Drive.cpp index baa348f..79ed05d 100644 --- a/Commands/Drivetrain/Drive.cpp +++ b/Commands/Drivetrain/Drive.cpp @@ -6,7 +6,7 @@ Drive::Drive(): Command("Drive") { void Drive::Initialize() {} void Drive::Execute() { float x, y, z; - x = -DentRobot::oi->GetLeftStick()->GetRawAxis(0); + x = DentRobot::oi->GetLeftStick()->GetRawAxis(0); y = DentRobot::oi->GetLeftStick()->GetRawAxis(1); z = DentRobot::oi->GetLeftStick()->GetRawAxis(2); //X axis, Y axis, Z axis, sensitivity, speed threshold (usually throttle) diff --git a/Subsystems/Drivetrain.cpp b/Subsystems/Drivetrain.cpp index 99b4d68..8098a93 100644 --- a/Subsystems/Drivetrain.cpp +++ b/Subsystems/Drivetrain.cpp @@ -21,8 +21,8 @@ void Drivetrain::DriveArcade(double x, double y, double z, double sensitivity, b } else { correctZ = -z * 0.5; } - leftRear->Set(correctY+(correctX-correctZ)); - rightRear->Set(correctY-(correctX-correctZ)); + leftRear->Set(-y+(x+z)); + rightRear->Set(y+(x+z)); } //Used in pretest void Drivetrain::TestMotor(e_motors motor, double power) {