Skip to content

Commit

Permalink
shorten functions
Browse files Browse the repository at this point in the history
  • Loading branch information
FriedLongJohns committed Oct 1, 2023
1 parent 6a5b4a7 commit 6d929d1
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,8 @@ public void periodic() {
isWristEncoderConnected = currTime - lastMeasuredTime < DISCONNECTED_ENCODER_TIMEOUT_SEC;
SmartDashboard.putBoolean("WristEncoderConnected", isWristEncoderConnected);

if(isArmEncoderConnected = false)
{
armMotor.stopMotor();
}
if(isWristEncoderConnected = false)
{
wristMotor.stopMotor();
}
if (!isArmEncoderConnected) armMotor.stopMotor();
if (!isWristEncoderConnected) wristMotor.stopMotor();

//TODO: is RobotContainer live or do you need supplier functions
armConstraints = new TrapezoidProfile.Constraints(
Expand Down

0 comments on commit 6d929d1

Please sign in to comment.