mirror of
https://github.com/team2059/Dent
synced 2024-12-18 20:52:29 -05:00
fixed drive
This commit is contained in:
parent
9f20b90bcd
commit
2ea5cf2900
@ -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)
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user