Skip to content

Individual LED Control #12

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Individual LED Control #12

wants to merge 7 commits into from

Conversation

jrdiver
Copy link

@jrdiver jrdiver commented Dec 28, 2024

Goes with #11

@@ -87,6 +87,9 @@ public sealed class SegmentRequest
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? Mirror { get; set; }

[JsonPropertyName("i")]
public object[] IndividualLedControl { get; set; } = [];
Copy link
Owner

Choose a reason for hiding this comment

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

Can this have a type?

Copy link
Author

Choose a reason for hiding this comment

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

There are a couple different things that can be in this list. Ends up being a mix of ints and strings, but there's not a pattern to how they are ordered - and Wled didn't respond to them all sent as strings im my testing. For what i set up - I'm ignoring the RGB option and going with just hex, but the hex string could be a list of 3 ints

just the Hex Values,
coordinate followed by hex color,
2 ints for start and end of a range followed by the hex color.


public async Task Post(List<SingleLedRequest> ledList)
Copy link
Owner

Choose a reason for hiding this comment

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

We could do with some tests around this Post method to prove out all the logic

Copy link
Author

Choose a reason for hiding this comment

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

I'll Look into this. Something in this repository keeps tripping the "warning as an error" thing for venerable nugets on my computer, even though im not seeing that flag on the projects, so may need to nudge a few of those along the way.

Copy link
Author

Choose a reason for hiding this comment

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

Think i got a test added now.

@kevbite kevbite added the enhancement New feature or request label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants