Skip to content

Commit ae87420

Browse files
committed
organization
Signed-off-by: Dasun Abeykoon <[email protected]>
1 parent e54ae94 commit ae87420

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

src/main/java/org/frc6423/robot/subsystems/superstructure/arm/ArmPivot.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public Command runAngle(DoubleSupplier angleRads) {
151151
* @return {@link Command}
152152
*/
153153
public Command runAngle(double angleRads) {
154-
return runAngle(() -> angleRads);
154+
return this.runAngle(() -> angleRads);
155155
}
156156

157157
@Override

src/main/java/org/frc6423/robot/subsystems/superstructure/elevator/Elevator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public void periodic() {
136136
}
137137

138138
/**
139-
* @return true if elevator has been zeroed
139+
* @return true if elevator has been homed
140140
*/
141141
@Logged(name = "Is Zeroed (bool)")
142142
public boolean isZeroed() {
@@ -206,7 +206,7 @@ public Command runCurrentHoming() {
206206
* @return {@link Command}
207207
*/
208208
public Command runExtension(ElevatorState extension) {
209-
return runExtension(extension.height);
209+
return this.runExtension(extension.height);
210210
}
211211

212212
/**
@@ -236,7 +236,7 @@ public Command runExtension(DoubleSupplier extensionMeters) {
236236
* @return {@link Command}
237237
*/
238238
public Command runExtension(double extensionMeters) {
239-
return runExtension(() -> extensionMeters);
239+
return this.runExtension(() -> extensionMeters);
240240
}
241241

242242
@Override

src/main/java/org/frc6423/robot/subsystems/superstructure/elevator/ElevatorIOReal.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@
2929

3030
/** Comp bot {@link ElevatorIO} */
3131
public class ElevatorIOReal implements ElevatorIO {
32-
private final TalonFX parent, child;
32+
private final TalonFX parent = new TalonFX(PARENT_MOTOR_ID, CANBUS);
33+
private final TalonFX child = new TalonFX(CHILD_MOTOR_ID, CANBUS);
3334

34-
private final TalonFXConfiguration conf;
35+
private final TalonFXConfiguration conf = new TalonFXConfiguration();
3536

3637
private final VoltageOut voltReq = new VoltageOut(0.0).withEnableFOC(true);
3738
private final MotionMagicTorqueCurrentFOC poseReq = new MotionMagicTorqueCurrentFOC(0.0);
@@ -40,11 +41,6 @@ public class ElevatorIOReal implements ElevatorIO {
4041
private final BaseStatusSignal childPoseSig, childCurrentSig, childTempSig;
4142

4243
public ElevatorIOReal() {
43-
parent = new TalonFX(PARENT_MOTOR_ID, CANBUS);
44-
child = new TalonFX(CHILD_MOTOR_ID, CANBUS);
45-
46-
conf = new TalonFXConfiguration();
47-
4844
conf.Audio.BeepOnBoot = true;
4945
conf.Audio.BeepOnConfig = true;
5046

@@ -54,10 +50,10 @@ public ElevatorIOReal() {
5450
conf.HardwareLimitSwitch.ForwardLimitAutosetPositionEnable = true;
5551
conf.HardwareLimitSwitch.ForwardLimitAutosetPositionValue = MAX_EXTENSION_HEIGHT.in(Meters);
5652

57-
conf.CurrentLimits.StatorCurrentLimitEnable = true;
58-
conf.CurrentLimits.StatorCurrentLimit = 80.0;
5953
conf.CurrentLimits.SupplyCurrentLimitEnable = true;
6054
conf.CurrentLimits.SupplyCurrentLimit = 40.0;
55+
conf.CurrentLimits.StatorCurrentLimitEnable = true;
56+
conf.CurrentLimits.StatorCurrentLimit = 80.0;
6157

6258
conf.Feedback.SensorToMechanismRatio = SENSOR_TO_MECH_RATIO;
6359
conf.ClosedLoopRamps.TorqueClosedLoopRampPeriod = 0.1;

0 commit comments

Comments
 (0)