mirror of
https://github.com/TimeCrafters/FTC_2022
synced 2025-12-15 17:52:34 +00:00
Finishing the "FreeSpirit" semi-auto cycle with a FreeSpirit = false.
This commit is contained in:
@@ -47,7 +47,7 @@ public class TeleOPTankDriver extends CyberarmState {
|
||||
}
|
||||
}
|
||||
|
||||
if (FreeSpirit) {
|
||||
if (FreeSpirit && System.currentTimeMillis() - lastStepTime >= 2000 && DeltaOdometerR < 4096) {
|
||||
getCurrentDriveCommand();
|
||||
drivePower = -currentDriveCommand;
|
||||
robot.backLeftDrive.setPower(drivePower);
|
||||
@@ -56,6 +56,10 @@ public class TeleOPTankDriver extends CyberarmState {
|
||||
robot.frontRightDrive.setPower(drivePower);
|
||||
}
|
||||
|
||||
if (FreeSpirit && System.currentTimeMillis() - lastStepTime >= 2000 && DeltaOdometerR >= 4096) {
|
||||
FreeSpirit = false;
|
||||
}
|
||||
|
||||
if (Math.abs(engine.gamepad1.left_stick_y) > 0.1 && !FreeSpirit) {
|
||||
drivePower = engine.gamepad1.left_stick_y;
|
||||
robot.backLeftDrive.setPower(drivePower);
|
||||
|
||||
Reference in New Issue
Block a user