2
0
mirror of https://github.com/team2059/Dent synced 2024-12-18 20:52:29 -05:00

fixed joystick button for slow speed

This commit is contained in:
Adam Long 2015-02-28 08:13:26 +00:00
parent 4b404cbed0
commit d9b34cd02a

View File

@ -15,7 +15,7 @@ void Drivetrain::DriveMecanum(float x, float y, float z, float sensitivity, floa
double correctY = (sensitivity*(pow(y,3))+(1-sensitivity)*y); double correctY = (sensitivity*(pow(y,3))+(1-sensitivity)*y);
double correctX = -(sensitivity*(pow(x,3))+(1-sensitivity)*x); double correctX = -(sensitivity*(pow(x,3))+(1-sensitivity)*x);
double correctZ = -z *.5; double correctZ = -z *.5;
if (DentRobot::oi->GetRightStick()->GetRawButton(9)){ if (DentRobot::oi->GetLeftStick()->GetRawButton(9)){
correctY /= SmartDashboard::GetNumber("DriveSpeedReductionThresh"); correctY /= SmartDashboard::GetNumber("DriveSpeedReductionThresh");
} }
rightFront->Set((-correctX + correctY - correctZ)); rightFront->Set((-correctX + correctY - correctZ));