Add a colour_light type for an addressable strip #132
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/yaml-colour-light"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
YN-14. New output type
colour_light: actrl::ColourEndpointon a WS2805 strip, as in the kitchen node. Fields arepin,pixels(1 to 1000, required),animation(uniformormiddle_out, defaultmiddle_out) andwarmandcoldin kelvin (defaults 2700 and 6500, warm below cold), plus the usualfailsafe,bindsanddisabled_modes. It takes noinvert,frequencyorfade.Per endpoint the generator declares, in the kitchen node's order, a
leds::Ws2805driver, ananim::AnimationLibraryon it, actrl::ColourConfig(animation index, kelvin range,Ease::QuadIn) and the endpoint, all named off the endpoint index, and callsdriver.begin()beforeupdateStack.begin. The animation indices (uniform0,middle_out1) matchanim::AnimationLibrary's order.colour_endpoint.h,animation_library.handws2805.hare included only when the type is present. To make the types data-driven, each output type now names a driver (relay,pwmorstrip) in the table instead of apwmflag, and the field lists come from it.No
lib_depschange is needed:node-runtimealready depends onled-stripsandstrip-animationsin itslibrary.json, so the dependency finder links them from the generated file. Checked with a realpio run -e gen_xiao_s3. No runtime change.Schema regenerated (per-type fields,
pixelsrequired), 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.
scripts/yaml_node.py line 89:
"endpointType": "ColourLight"is never read. Only the pwm entries use it, viadeclare_endpoint. Drop it.Nothing else to act on.