Skip to content
This repository was archived by the owner on Sep 14, 2019. It is now read-only.

Commit 97d96f8

Browse files
authored
Merge pull request #95 from lhmcgann/change-motors-to-brake-mode
Change motors to brake mode
2 parents 5736362 + b156faf commit 97d96f8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Robot2018/src/org/usfirst/frc/team199/Robot2018/RobotMap.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import org.usfirst.frc.team199.Robot2018.autonomous.PIDSourceAverage;
1111

12+
import com.ctre.phoenix.motorcontrol.NeutralMode;
1213
import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX;
1314
import com.ctre.phoenix.motorcontrol.can.WPI_VictorSPX;
1415
import com.kauailabs.navx.frc.AHRS;
@@ -93,6 +94,8 @@ private void configSRX(WPI_TalonSRX mc) {
9394
mc.enableCurrentLimit(true);
9495

9596
mc.configNeutralDeadband(Robot.getConst("Motor Deadband", 0.001), kTimeout);
97+
98+
mc.setNeutralMode(NeutralMode.Brake);
9699
}
97100

98101
/**
@@ -111,6 +114,8 @@ private void configSPX(WPI_VictorSPX mc) {
111114
mc.configPeakOutputReverse(-1, kTimeout);
112115

113116
mc.configNeutralDeadband(Robot.getConst("Motor Deadband", 0.001), kTimeout);
117+
118+
mc.setNeutralMode(NeutralMode.Brake);
114119
}
115120

116121
public RobotMap() {

0 commit comments

Comments
 (0)