-
Notifications
You must be signed in to change notification settings - Fork 0
added intake #6
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
base: main
Are you sure you want to change the base?
added intake #6
Conversation
|
closes #1 |
cam5028
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned you want to replace the the rev SparkMax controllers with CTRE TalonFX controllers. they are similar in that they both require CANIDs. but the method (functions) calls are different so you will have to look and compare the java docs to see what to use..
|
Attempted to redo the intake subsystem with CTRE instead of the sparkmax stuff |
| telemetry.telemetrizeIntake(getCurrentVelocity()); | ||
| } | ||
|
|
||
| public double getCurrentVelocity() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have a method that returns a double but the return value performs a multiplication operation using a Double (Object data types) and a double (primitive data type) return motorVelocity * 60.0. While this is ok because of something called "auto-unboxing " be cautious of relying on implicit functions rather that explicit ones when starting off. What happens when you remove the multiplication operation? (try it).
| telemetry.telemetrizeIntake(getCurrentVelocity()); | ||
| } | ||
|
|
||
| public double getCurrentVelocity() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getCurrentVelocity may be confused with the word "Current" as that is also used in this same class to define electrical current (SupplyCurrentLimit) whereas this appears to be as an adjective. If so, suggest removing "Current" from method name
| public void intake() { | ||
| // Starts the Motor | ||
|
|
||
| intakeMotorController.set(-1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CTRE's Phoenix 6 API now requires the use of "Control request" to now set outputs to their devices. https://v6.docs.ctr-electronics.com/en/2025/docs/api-reference/api-usage/control-requests.html
Please take a look at the examples and update as needed. You can use the same simulation tool to test as you did before
cam5028
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall nice job! I will recommend that you looko ver the Style.md file provided in the repo: https://github.com/FRC1740/2026-Robot/blob/main/STYLE.md
added intake using sparkmax not the other one.