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

fixed drive

This commit is contained in:
Adam Long 2015-09-22 20:07:00 +00:00
parent 9f20b90bcd
commit 2ea5cf2900
2 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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) {