Skip to content

Commit 2bc0fbb

Browse files
committed
refresh io
1 parent b617c6d commit 2bc0fbb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/main/java/frc/robot/subsystems/coral/CoralIOFX.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
package frc.robot.subsystems.coral;
22

3-
import static edu.wpi.first.units.Units.*;
3+
import static edu.wpi.first.units.Units.RotationsPerSecond;
44

5+
import com.ctre.phoenix6.BaseStatusSignal;
56
import com.ctre.phoenix6.StatusSignal;
67
import com.ctre.phoenix6.configs.TalonFXSConfiguration;
78
import com.ctre.phoenix6.configs.TalonFXSConfigurator;
@@ -66,11 +67,10 @@ public void enableRevLimitSwitch(boolean enabled) {
6667

6768
@Override
6869
public void updateInputs(CoralIOInputs inputs) {
69-
inputs.velocity = curVelocity.refresh().getValue();
70-
inputs.isFwdLimitSwitchClosed =
71-
fwdLimitSwitch.refresh().getValue().value == 1; // FIXME check right value
72-
inputs.isRevLimitSwitchClosed =
73-
revLimitSwitch.refresh().getValue().value == 0; // FIXME check right value
70+
BaseStatusSignal.refreshAll(curVelocity, fwdLimitSwitch, revLimitSwitch);
71+
inputs.velocity = curVelocity.getValue();
72+
inputs.isFwdLimitSwitchClosed = fwdLimitSwitch.getValue().value == 1; // FIXME check right value
73+
inputs.isRevLimitSwitchClosed = revLimitSwitch.getValue().value == 0; // FIXME check right value
7474
}
7575

7676
@Override

0 commit comments

Comments
 (0)