Let PWM outputs drive several pins with a pins list #127
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/yaml-pins-list"
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-10.
dimmable_lightandvariable_fantake eitherpinorpins(a list), never both.PwmConfig::pinsalready drives several pins on one LEDC channel, so there is no runtime change. Each list entry goes through the sameparse_pinas a singlepin(now taking the pin value rather than the raw endpoint), so a later change to the strapping rule lands in one place. Errors name the entry, e.g.endpoints[2].pins[1]: D0 is a strapping pin. An empty list, both fields, or neither are rejected, and the I2C clash with a temperature endpoint is checked per entry. Light, fan, load and the inputs stay singlepin.The schema allows
pinson the two PWM types only, with exactly one ofpinorpinsand each entry limited to the board's output pins. README documents it. The LOLIN32 fixture'sdimmable_lightnow usespins: [17, 18], so CI compiles a multi-pin output.Tested: Python 36 (was 30), none skipped locally; cutting the generated list to its first pin fails the render test. The three fixtures build and the generated array is
{17, 18}. Nothing underlib/ordocs/is touched.Two minor points, nothing blocking.
pinshas nouniqueItems, but the generator rejects a repeated pin ("already used"). Add"uniqueItems": Trueso the schema and generator agree.pinFieldsis a parallel array zipped back withpinsat line 258. Keep one list of (field, pin) pairs instead, or droppinFieldsand rebuild the field names fromendpoint["field"]at the one place that needs them.Pins shouldn't be a pre-set list, it should just be an array of strings or ints