Skip to content

adding leds to the lib, UNTESTED#1

Open
blazecoding2009 wants to merge 3 commits into
PerfectlyInternal:2024from
blazecoding2009:2024-leds
Open

adding leds to the lib, UNTESTED#1
blazecoding2009 wants to merge 3 commits into
PerfectlyInternal:2024from
blazecoding2009:2024-leds

Conversation

@blazecoding2009

Copy link
Copy Markdown

No description provided.

@PerfectlyInternal PerfectlyInternal left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

a few minor changes to keep stuff in order, overall looks like it should work

public class Leds extends SubsystemBase {
private final LedConfig config; // Configuration object for LEDs

private Spark LEDController; // Spark object for controlling LEDs

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

move this to the config so the user can pass their own spark if theyd like

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

confused about this, how would i do that

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

take a look at other subsystems that use non-motor hardware & their configs

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

all sybsystems haev motors 💀

Comment thread src/main/java/com/orbit/frc/subsystems/leds/LedsConfig.java
Comment thread src/main/java/com/orbit/frc/subsystems/leds/LedsConfig.java Outdated
* - config: Configuration object for LEDs
*/
public Leds(LedConfig config) {
this.LEDController = new Spark(config.LEDPort); // Initialize LED controller

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

remember to change references to the controller when its in the config, and also check to see if it should be inited from port or just using the object passed in the config

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

imo it should be inited from the port, makes it less confusing in config

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

If the user wants to provide their own spark object, we should support that

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