docs: guide readers between JLedGroup and JLedRefGroup, drop deferred-feature promise#175
Closed
jandelgado wants to merge 1 commit into
Closed
docs: guide readers between JLedGroup and JLedRefGroup, drop deferred-feature promise#175jandelgado wants to merge 1 commit into
jandelgado wants to merge 1 commit into
Conversation
jandelgado
force-pushed
the
group_documentation_update
branch
from
July 19, 2026 14:02
8358a68 to
b0e8090
Compare
jandelgado
force-pushed
the
group_documentation_update
branch
from
July 19, 2026 14:16
b0e8090 to
428a348
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documentation only, no code changes.
What
1. New "When to use what?" section in the group chapter, so readers can pick a group type without reading both subsections first. It leads with
JLedGroupas the default and framesJLedRefGrouparound the decision that drives the choice: whether you already keep your LEDs as named variables.In that case
JLedRefGroupis substantially more memory efficient, because aJLedGroupstores its own copy of every LED, so a named LED ends up stored twice. Measured on atmega328p at-Os, six namedJLedobjects plus the group:JLedJLedGroupJLedRefGroupPer element that is 54 bytes (24 for your named object + 30 for the
JLedAnycopy) against 28 (24 + a 4-byteJLedRef).The section states this as a conditional benefit rather than a blanket one, because it does not hold when the LEDs live only inside the group and you never touch them individually. There the two are close to a wash, and the sign even flips with LED type, since
sizeof(JLedRef) + sizeof(JLedHD)(32) exceedssizeof(JLedAny)(30):JLedGroupRAMJLedRefGroupRAMJLedJLedHD2. Removed two forward-looking promises about per-element events:
That feature is deferred with no timeline, so the README should not advertise it.
3. Documented what works today in its place. To react to a single LED inside a group, keep it as a named variable and watch its own state across the
Update()call:Verified against the host test mocks: this fires exactly once, on the tick
led1completes, while other group members keep running.Notes
[Percentage](#percentage)at line 644, is left alone to keep this PR focused. There is no matching heading in the file, so it needs a decision about where it should point rather than a mechanical fix.