Skip to content

Commit

Permalink
fixed requested speeds
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenneth-Choothakan committed Mar 2, 2024
1 parent 494eea0 commit e472500
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/org/carlmontrobotics/subsystems/Arm.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,19 +123,19 @@ public void periodic() {
autoCancelArmCommand();
}

/* public void autoCancelArmCommand() {
public void autoCancelArmCommand() {
if(!(getDefaultCommand() instanceof ArmTeleop) || DriverStation.isAutonomous()) return;

double[] requestedSpeeds = ((ArmTeleop) getDefaultCommand()).getRequestedSpeeds();
double requestedSpeeds = ((ArmTeleop) getDefaultCommand()).getRequestedSpeeds();

if(requestedSpeeds[0] != 0 || requestedSpeeds[1] != 0) {
if(requestedSpeeds != 0) {
Command currentArmCommand = getCurrentCommand();
if(currentArmCommand != getDefaultCommand() && currentArmCommand != null) {
currentArmCommand.cancel();
}
}
}
*/

//#region Drive Methods

public void driveArm(double goalAngle) {
Expand Down

0 comments on commit e472500

Please sign in to comment.