Driving is more sane now.

This commit is contained in:
dkbug 2016-02-20 16:22:05 -05:00
parent 5217a7fcd5
commit c32e95768c
1 changed files with 6 additions and 4 deletions

View File

@ -254,13 +254,15 @@ private:
oldXY = x + y; oldXY = x + y;
if (x > 0) if (x > 0)
{ {
left_drive.Set(y * driver_stick.GetThrottle()); float left = y * driver_stick.GetThrottle();
right_drive.Set((1-x)*y * driver_stick.GetThrottle()); float right = (1-x)*y * driver_stick.GetThrottle();
drive.TankDrive(left, right);
} }
else else
{ {
right_drive.Set(y * driver_stick.GetThrottle()); float left = y * driver_stick.GetThrottle();
left_drive.Set((1+x)*y * driver_stick.GetThrottle()); float right = (1+x)*y * driver_stick.GetThrottle();
drive.TankDrive(left, right);
} }
} }
} }