You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/org/carlmontrobotics/lib199/MotorControllerFactory.java
+32Lines changed: 32 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,37 @@ public static WPI_TalonSRX createTalon(int id) {
56
56
57
57
returntalon;
58
58
}
59
+
/**
60
+
* This class returns a SparkBase, initialized to either a SparkMax or SparkFlex depending on the {@link MotorConfig#controllerType}.
61
+
* Note that SparkBase lacks some of the functionality of SparkMax and SparkFlex, use {@link MotorControllerFactory#createSparkMax(int, MotorConfig)} or {@link MotorControllerFactory#createSparkFlex(int)} to get a SparkMax or SparkFlex object.
62
+
* To use the configAccessor, use {@link MotorControllerFactory#getConfigAccessor(SparkBase)}
63
+
*
64
+
* @param id the port of the motor controller
65
+
* @param motorConfig the motor configuration to use
* This class returns a SparkBase, initialized to either a SparkMax or SparkFlex depending on the {@link MotorConfig#controllerType}.
72
+
* Note that SparkBase lacks some of the functionality of SparkMax and SparkFlex, use {@link MotorControllerFactory#createSparkMax(int, MotorConfig, SparkBaseConfig)} or {@link MotorControllerFactory#createSparkFlex(int, MotorConfig, SparkBaseConfig)} to get a SparkMax or SparkFlex object.
73
+
* To use the configAccessor, use {@link MotorControllerFactory#getConfigAccessor(SparkBase)}
74
+
*
75
+
* @param id the port of the motor controller
76
+
* @param motorConfig the motor configuration to use
77
+
* @param config the custom SparkBase configuration to apply instead of the default for the motorConfig
0 commit comments