Add a colour_light type for an addressable strip #132

Merged
Claude merged 2 commits from feat/yaml-colour-light into feat/yaml-nodes 2026-10-16 08:39:19 +00:00
Collaborator

YN-14. New output type colour_light: a ctrl::ColourEndpoint on a WS2805 strip, as in the kitchen node. Fields are pin, pixels (1 to 1000, required), animation (uniform or middle_out, default middle_out) and warm and cold in kelvin (defaults 2700 and 6500, warm below cold), plus the usual failsafe, binds and disabled_modes. It takes no invert, frequency or fade.

Per endpoint the generator declares, in the kitchen node's order, a leds::Ws2805 driver, an anim::AnimationLibrary on it, a ctrl::ColourConfig (animation index, kelvin range, Ease::QuadIn) and the endpoint, all named off the endpoint index, and calls driver.begin() before updateStack.begin. The animation indices (uniform 0, middle_out 1) match anim::AnimationLibrary's order. colour_endpoint.h, animation_library.h and ws2805.h are included only when the type is present. To make the types data-driven, each output type now names a driver (relay, pwm or strip) in the table instead of a pwm flag, and the field lists come from it.

No lib_deps change is needed: node-runtime already depends on led-strips and strip-animations in its library.json, so the dependency finder links them from the generated file. Checked with a real pio run -e gen_xiao_s3. No runtime change.

Schema regenerated (per-type fields, pixels required), README type table and a short note, and the S3 fixture gains a strip with a toggle bind from its touch pad so CI compiles it.

Tested: Python 61 (was 56), none skipped locally. Tests cover field validation, declaration order, both animations, the kelvin defaults and overrides, and that other nodes never include the strip headers; hard-coding the animation fails them. All three fixtures build.

YN-14. New output type `colour_light`: a `ctrl::ColourEndpoint` on a WS2805 strip, as in the kitchen node. Fields are `pin`, `pixels` (1 to 1000, required), `animation` (`uniform` or `middle_out`, default `middle_out`) and `warm` and `cold` in kelvin (defaults 2700 and 6500, warm below cold), plus the usual `failsafe`, `binds` and `disabled_modes`. It takes no `invert`, `frequency` or `fade`. Per endpoint the generator declares, in the kitchen node's order, a `leds::Ws2805` driver, an `anim::AnimationLibrary` on it, a `ctrl::ColourConfig` (animation index, kelvin range, `Ease::QuadIn`) and the endpoint, all named off the endpoint index, and calls `driver.begin()` before `updateStack.begin`. The animation indices (`uniform` 0, `middle_out` 1) match `anim::AnimationLibrary`'s order. `colour_endpoint.h`, `animation_library.h` and `ws2805.h` are included only when the type is present. To make the types data-driven, each output type now names a driver (`relay`, `pwm` or `strip`) in the table instead of a `pwm` flag, and the field lists come from it. No `lib_deps` change is needed: `node-runtime` already depends on `led-strips` and `strip-animations` in its `library.json`, so the dependency finder links them from the generated file. Checked with a real `pio run -e gen_xiao_s3`. No runtime change. Schema regenerated (per-type fields, `pixels` required), README type table and a short note, and the S3 fixture gains a strip with a toggle bind from its touch pad so CI compiles it. Tested: Python 61 (was 56), none skipped locally. Tests cover field validation, declaration order, both animations, the kelvin defaults and overrides, and that other nodes never include the strip headers; hard-coding the animation fails them. All three fixtures build.
Add a colour_light type for an addressable strip
Some checks failed
Build and test / release (pull_request) Has been cancelled
Build and test / build (pull_request) Has been cancelled
40db24b5f0
Claude left a comment

scripts/yaml_node.py line 89: "endpointType": "ColourLight" is never read. Only the pwm entries use it, via declare_endpoint. Drop it.

Nothing else to act on.

scripts/yaml_node.py line 89: `"endpointType": "ColourLight"` is never read. Only the pwm entries use it, via `declare_endpoint`. Drop it. Nothing else to act on.
Drop the unused endpoint type from the colour_light entry
All checks were successful
Build and test / build (pull_request) Successful in 5m10s
Build and test / release (pull_request) Has been skipped
003db30a63
Claude merged commit c17b321df0 into feat/yaml-nodes 2026-10-16 08:39:19 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rob/CampervanControlSystems!132
No description provided.