Added basic states for motor

This commit is contained in:
2024-11-05 16:40:46 -08:00
parent a2fa3341b1
commit 2a06f7e98d

View File

@ -18,7 +18,6 @@ import org.firstinspires.ftc.robotcore.external.Telemetry;
public class MotorsSubsystem {
public HardwareMap hardwareMap;
public Telemetry telemetry;
public DcMotor frontLeftMotor;
@ -26,6 +25,12 @@ public class MotorsSubsystem {
public DcMotor frontRightMotor;
public DcMotor backRightMotor;
public enum TravelState {
PARKED, BUCKET, SUBMARINE
}
public TravelState travelState;
public double power;
public MotorsSubsystem(HardwareMap hardwareMap, Telemetry telemetry) {
@ -114,4 +119,12 @@ public class MotorsSubsystem {
this.telemetry.update();
}
public void setState(TravelState travelState) {
this.travelState = travelState;
}
public TravelState getState() {
return this.travelState;
}
}