Skip to content

Conversation

@zack30811
Copy link

added intake using sparkmax not the other one.

@zack30811
Copy link
Author

closes #1

Copy link
Contributor

@cam5028 cam5028 left a 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..

@zack30811 zack30811 closed this Jan 29, 2026
@zack30811 zack30811 reopened this Jan 29, 2026
@zack30811
Copy link
Author

Attempted to redo the intake subsystem with CTRE instead of the sparkmax stuff

telemetry.telemetrizeIntake(getCurrentVelocity());
}

public double getCurrentVelocity() {
Copy link
Contributor

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() {
Copy link
Contributor

@cam5028 cam5028 Feb 8, 2026

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);
Copy link
Contributor

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

Copy link
Contributor

@cam5028 cam5028 left a 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

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

Successfully merging this pull request may close these issues.

2 participants