File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
src/main/java/frc/robot/subsystems/example Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 11package frc .robot .subsystems .example ;
22
3+ import com .ctre .phoenix6 .BaseStatusSignal ;
34import com .ctre .phoenix6 .StatusSignal ;
45import com .ctre .phoenix6 .configs .TalonFXConfiguration ;
56import com .ctre .phoenix6 .configs .TalonFXConfigurator ;
@@ -63,8 +64,9 @@ public void setPosition(Angle position) {
6364
6465 @ Override
6566 public void updateInputs (ExampleIOInputs inputs ) {
66- inputs .velocity = currVelocity .refresh ().getValue ();
67- inputs .position = currPosition .refresh ().getValue ().minus (relSetpointOffset );
67+ BaseStatusSignal .refreshAll (currVelocity , currPosition );
68+ inputs .velocity = currVelocity .getValue ();
69+ inputs .position = currPosition .getValue ().minus (relSetpointOffset );
6870 }
6971
7072 @ Override
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ public boolean isFinished() {
5858 public void periodic () {
5959 // Read Inputs
6060 io .updateInputs (inputs );
61+ Logger .processInputs (getName (), inputs );
6162
6263 // State Machine
6364 switch (curState ) {
You can’t perform that action at this time.
0 commit comments