Skip to content

Commit

Permalink
removed various motor stop commands
Browse files Browse the repository at this point in the history
  • Loading branch information
GearBoxFox committed Feb 2, 2024
1 parent 03ce07e commit 5ff1add
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ public void teleopInit() {
@Override
public void teleopPeriodic() {
// Function is empty simply to overwrite the default, which throws an error
// robotContainer.m_armSubsystem.stopArmFactory().schedule();
}

/** This function is called once when test mode is enabled. */
Expand Down
6 changes: 2 additions & 4 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,23 +165,21 @@ private void configureButtonBindings() {
// m_driveSubsystem)
// .ignoringDisable(true));

m_armSubsystem.setDefaultCommand(m_armSubsystem.stopArmFactory());

controller.a().whileTrue(m_armSubsystem.setShoulderPowerFactory(armPower.get()))
.whileFalse(m_armSubsystem.setShoulderPowerFactory(0.0));
controller.y().whileTrue(m_armSubsystem.setShoulderPowerFactory(-armPower.get()))
.whileFalse(m_armSubsystem.setShoulderPowerFactory(0.0));

controller.b().whileTrue(m_armSubsystem.setShoulderPositionFactory(armPosition.get()))
.whileFalse(m_armSubsystem.setShoulderPositionFactory(0.0));
.whileFalse(m_armSubsystem.setShoulderPowerFactory(0.0));

controller.leftBumper().whileTrue(m_armSubsystem.setWristPowerFactory(wristPower.get()))
.whileFalse(m_armSubsystem.setWristPowerFactory(0.0));
controller.rightBumper().whileTrue(m_armSubsystem.setWristPowerFactory(-wristPower.get()))
.whileFalse(m_armSubsystem.setWristPowerFactory(0.0));

controller.x().whileTrue(m_armSubsystem.setWristPositionFactory(wristPosition.get()))
.whileFalse(m_armSubsystem.setWristPositionFactory(0.0));
.whileFalse(m_armSubsystem.setWristPowerFactory(0.0));

}

Expand Down
2 changes: 0 additions & 2 deletions src/main/java/frc/robot/subsystems/arm/ArmSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ public void periodic() {
m_io.setShoulderVoltage(0.0);
SmartDashboard.putNumber("Recorded Wrist Position", m_io.getWristPosition().getDegrees());
SmartDashboard.putNumber("Recorded Shoulder Position", m_io.getShoulderPosition().getDegrees());

stopArmFactory().schedule();
}

public void setShoulderPower(double power) {
Expand Down

0 comments on commit 5ff1add

Please sign in to comment.