File tree Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ public static CurrentLimitsConfigs getZeroingCurrentLimitsConfigs() {
100100 .withSupplyCurrentLimitEnable (true );
101101 return current ;
102102 }
103+
103104 public static SoftwareLimitSwitchConfigs getZeroingSoftLimitConfigs () {
104105 SoftwareLimitSwitchConfigs swLimit =
105106 new SoftwareLimitSwitchConfigs ()
@@ -109,4 +110,3 @@ public static SoftwareLimitSwitchConfigs getZeroingSoftLimitConfigs() {
109110 return swLimit ;
110111 }
111112}
112-
Original file line number Diff line number Diff line change 11package frc .robot .subsystems .laser ;
2+
23import static edu .wpi .first .units .Units .Rotations ;
4+
35import edu .wpi .first .units .measure .Angle ;
46import frc .robot .constants .LaserConstants ;
57import java .util .Set ;
@@ -33,8 +35,8 @@ public void zero() {
3335 }
3436 // TODO Find whats up with these functions not needing @Overide
3537 public boolean isFinished () {
36- return Math .abs (getLaserPos ().minus (setPoint ).in (Rotations )) < LaserConstants .kLaserCloseEnough &&
37- curState != LaserStates .ZEROING ;
38+ return Math .abs (getLaserPos ().minus (setPoint ).in (Rotations )) < LaserConstants .kLaserCloseEnough
39+ && curState != LaserStates .ZEROING ;
3840 }
3941
4042 @ Override
@@ -43,6 +45,7 @@ public Set<Measure> getMeasures() {
4345 new Measure ("Turret Finished?" , () -> isFinished () ? 1 : 0 ),
4446 new Measure ("Turret Setpoint" , () -> setPoint .in (Rotations )));
4547 }
48+
4649 public void perodic () {
4750 io .updateInputs (inputs );
4851
Original file line number Diff line number Diff line change 22
33import com .ctre .phoenix6 .configs .CurrentLimitsConfigs ;
44import com .ctre .phoenix6 .configs .SoftwareLimitSwitchConfigs ;
5-
65import edu .wpi .first .units .measure .Angle ;
76import org .littletonrobotics .junction .AutoLog ;
87import org .strykeforce .telemetry .TelemetryService ;
@@ -29,5 +28,5 @@ public default void setOpenLoopVelocity(double output) {}
2928
3029 public default void setLimitConfig (CurrentLimitsConfigs config ) {}
3130
32- public default void setSoftLimitConfig (SoftwareLimitSwitchConfigs config ){}
31+ public default void setSoftLimitConfig (SoftwareLimitSwitchConfigs config ) {}
3332}
Original file line number Diff line number Diff line change @@ -66,7 +66,8 @@ public void setOpenLoopVoltage(double output) {
6666 public void setOpenLoopVelocity (double output ) {
6767 talonFX .setControl (openLoopVelocity .withOutput (output ));
6868 }
69- public void setSoftLimitConfig (SoftwareLimitSwitchConfigs config ){
69+
70+ public void setSoftLimitConfig (SoftwareLimitSwitchConfigs config ) {
7071 talonFXConfigurator .apply (config );
7172 }
7273}
You can’t perform that action at this time.
0 commit comments