Until Vortex support is added to lib199, immediately after constructing the controller, put it in a known state and then set any relevant configuration parameters (e.g. voltage compensation, the smart current limit, etc). You can largely just copy this code:
https://github.com/DeepBlueRobotics/lib199/blob/cc93080eab462da161d0d47eda253ac8b31495ee/src/main/java/org/carlmontrobotics/lib199/MotorControllerFactory.java#L125-L138
The following code should be motor/controller-agnostic whenever possible so that minimal changes are required when changing motors/controllers.
|
private final CANSparkFlex outakeMotorVortex = new CANSparkFlex(10,MotorType.kBrushless); |
Specifically, that means:
- Use a
CANSparkBase instead of CANSparkVortex as the type.
- Use an agnostic variable name like
outtakeMotor instead of outakeVortexMotor.
Until Vortex support is added to lib199, immediately after constructing the controller, put it in a known state and then set any relevant configuration parameters (e.g. voltage compensation, the smart current limit, etc). You can largely just copy this code:
https://github.com/DeepBlueRobotics/lib199/blob/cc93080eab462da161d0d47eda253ac8b31495ee/src/main/java/org/carlmontrobotics/lib199/MotorControllerFactory.java#L125-L138
The following code should be motor/controller-agnostic whenever possible so that minimal changes are required when changing motors/controllers.
RobotCode2024/src/main/java/org/carlmontrobotics/subsystems/IntakeShooter.java
Line 41 in 53130a7
Specifically, that means:
CANSparkBaseinstead ofCANSparkVortexas the type.outtakeMotorinstead ofoutakeVortexMotor.