File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
src/main/java/frc/robot/subsystems/coral Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 11package 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 ;
56import com .ctre .phoenix6 .StatusSignal ;
67import com .ctre .phoenix6 .configs .TalonFXSConfiguration ;
78import 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
You can’t perform that action at this time.
0 commit comments