Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outtake Vortex Review #42

Open
brettle opened this issue Mar 27, 2024 · 0 comments
Open

Outtake Vortex Review #42

brettle opened this issue Mar 27, 2024 · 0 comments

Comments

@brettle
Copy link
Member

brettle commented Mar 27, 2024

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:

  1. Use aCANSparkBase instead of CANSparkVortex as the type.
  2. Use an agnostic variable name like outtakeMotor instead of outakeVortexMotor.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant