Skip to content

Conversation

@abi-appusamy9932
Copy link
Contributor

LedIO + CANdle and Sim implementations

LedStrip for high level control

LedIO + CANdle and Sim implementations

LedStrip for high level control
@Luddo183 Luddo183 linked an issue Jul 9, 2025 that may be closed by this pull request
Copy link
Contributor

@Luddo183 Luddo183 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, the logic and control is good. There's a few implementation things that need to be tweaked, and the code needs to rewritten to use the latest Phoenix6 API. Start by deleting the Phoenix5 vendordep, and see what you need to rewrite from there.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a function to set the entire strip (all it needs to do is call setFirst and setSecond, but a single function to do both would be nice)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid using the Phoenix specific Animation type in the generic IO. You could make a custom class that extends Animation, or a class that can convert itself to a Phoenix Animation (eg. PIDFFConfigs).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember integers aren't always perfectly divisible by 2

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how hard it would be to implement, but it would be possible to also animate halves (eg. top half is the rainbow animation, bottom is the fire animation)? Not necessary though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid using driver/operator naming, stick to the first/second naming.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comments on the class are nice, but don't explain the functions in the class doc. Just a high-level explanation of what the class does.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are using a periodic() function, would it useful to have the class extend SubsystemBase so the periodic function gets called automatically? It would also let you use commands to set the LEDs, and let the CommandScheduler handle conflicts.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default state for the LEDs should always be off, and not flashing white.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't there a better way to do flashing? If you already using animations, why not create a flashing animation?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going forward, avoid changing stuff in other files not related to the task at hand. These are just comments, so I'll leave them, but if you want to edit something else, make another branch.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Phoenix5 is no longer necessary, Phoenix6 now includes the CANdle stuff.

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.

LED Code

4 participants