From c32e95768cf02b62c8ff74ecda76028b9144faaf Mon Sep 17 00:00:00 2001 From: dkbug Date: Sat, 20 Feb 2016 16:22:05 -0500 Subject: [PATCH] Driving is more sane now. --- Robot2016/src/Robot.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Robot2016/src/Robot.cpp b/Robot2016/src/Robot.cpp index 1bbb859..ce3e84e 100644 --- a/Robot2016/src/Robot.cpp +++ b/Robot2016/src/Robot.cpp @@ -254,13 +254,15 @@ private: oldXY = x + y; if (x > 0) { - left_drive.Set(y * driver_stick.GetThrottle()); - right_drive.Set((1-x)*y * driver_stick.GetThrottle()); + float left = y * driver_stick.GetThrottle(); + float right = (1-x)*y * driver_stick.GetThrottle(); + drive.TankDrive(left, right); } else { - right_drive.Set(y * driver_stick.GetThrottle()); - left_drive.Set((1+x)*y * driver_stick.GetThrottle()); + float left = y * driver_stick.GetThrottle(); + float right = (1+x)*y * driver_stick.GetThrottle(); + drive.TankDrive(left, right); } } }