2
0
mirror of https://github.com/team2059/Dent synced 2025-01-07 22:14:14 -05:00

fixed warnings

This commit is contained in:
Adam Long 2015-10-08 16:03:20 +00:00
parent 8930aaf23d
commit a53f4ef5ff

View File

@ -11,16 +11,7 @@ void Drivetrain::InitDefaultCommand() {
SetDefaultCommand(new Drive());
}
void Drivetrain::DriveArcade(double x, double y, double z, double sensitivity, bool driveStraight) {
double kP = SmartDashboard::GetNumber("Gyro kP");
double correctX = -(sensitivity*(pow(x, 3))+(1-sensitivity)*x);
double correctY = (sensitivity*(pow(y, 3))+(1-sensitivity)*y);
double correctZ = z;
if(driveStraight) {
printf("Driving straight at: %f\n", -gyro->GetAngle()*kP);
correctZ = -gyro->GetAngle()*kP;
} else {
correctZ = -z * 0.5;
}
//TODO add encoder support for driving straight
leftRear->Set(-y+(x+z));
rightRear->Set(y+(x+z));
}