Skip to content

Commit b82dd2f

Browse files
committed
resloved comment
1 parent 7b2bf1b commit b82dd2f

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/main/java/org/carlmontrobotics/lib199/MotorControllerFactory.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -167,15 +167,7 @@ public static MotorControllerType getControllerType(SparkBase motor){
167167
}
168168

169169
public static SparkBaseConfig sparkConfig(MotorConfig motorConfig){
170-
SparkBaseConfig config = null;
171-
switch(motorConfig.getControllerType()){
172-
case SPARK_MAX:
173-
config = new SparkMaxConfig();
174-
break;
175-
case SPARK_FLEX:
176-
config = new SparkFlexConfig();
177-
break;
178-
}
170+
SparkBaseConfig config = motorConfig.controllerType.createConfig();
179171
//configs that apply to all motors
180172
config.idleMode(IdleMode.kBrake);
181173
config.voltageCompensation(12);

0 commit comments

Comments
 (0)