Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Commit c264c7e

Browse files
committed
Rename brakingmode to neutralmode
1 parent 410114a commit c264c7e

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

src/main/java/frc/robot/Main.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77
import edu.wpi.first.wpilibj.RobotBase;
88

99
/**
10-
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what
11-
* you are doing, do not modify this file except to change the parameter class to the startRobot
12-
* call.
10+
* Do NOT add any static variables to this class, or any initialization at all. Unless you know what you are doing, do
11+
* not modify this file except to change the parameter class to the startRobot call.
1312
*/
1413
public final class Main {
1514
private Main() {}
1615

1716
/**
1817
* Main initialization function. Do not perform any initialization here.
1918
*
20-
* <p>If you change your main robot class, change the parameter type.
19+
* <p>
20+
* If you change your main robot class, change the parameter type.
2121
*/
2222
public static void main(String... args) {
2323
RobotBase.startRobot(Robot::new);

src/main/java/frc/robot/commands/drive/ToggleBrakingModeCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public ToggleBrakingModeCommand(DriveBase driveBase) {
2424

2525
@Override
2626
public void initialize() {
27-
driveBase.toggleBrakingMode();
27+
driveBase.toggleNeutralMode();
2828
}
2929

3030
@Override

src/main/java/frc/robot/subsystems/DriveBase.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public DriveBase(int leftFrontId, int leftBackId, int rightFrontId, int rightBac
110110
rightBackMotor.configSelectedFeedbackSensor(FeedbackDevice.IntegratedSensor);
111111

112112

113-
setBrakingMode(NeutralMode.Brake);
113+
setNeutralMode(NeutralMode.Brake);
114114

115115
differentialDrive =
116116
new LobstahDifferentialDrive(
@@ -130,24 +130,26 @@ public DriveBase(int leftFrontId, int leftBackId, int rightFrontId, int rightBac
130130
/**
131131
* Toggles the {@link NeutralMode} between Coast and Brake.
132132
*/
133-
public void toggleBrakingMode() {
133+
public void toggleNeutralMode() {
134134
switch (motorNeutralMode) {
135135
case Brake:
136-
setBrakingMode(NeutralMode.Coast);
136+
setNeutralMode(NeutralMode.Coast);
137137
return;
138138
case Coast:
139+
setNeutralMode(NeutralMode.Brake);
140+
return;
139141
default:
140-
setBrakingMode(NeutralMode.Brake);
142+
setNeutralMode(NeutralMode.Brake);
141143
return;
142144
}
143145
}
144146

145147
/**
146-
* Sets the braking mode to the given {@link NeutralMode}.
148+
* Sets the neutral mode to the given {@link NeutralMode}.
147149
*
148150
* @param mode The {@link NeutralMode} to set the motors to
149151
*/
150-
public void setBrakingMode(NeutralMode mode) {
152+
public void setNeutralMode(NeutralMode mode) {
151153
leftFrontMotor.setNeutralMode(mode);
152154
leftBackMotor.setNeutralMode(mode);
153155
rightFrontMotor.setNeutralMode(mode);

0 commit comments

Comments
 (0)