Add NODE_KITCHEN (0x11) firmware #66
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/kitchen-node"
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?
First cut of the kitchen node, matching the previous-generation firmware: one PWM under-cabinet strip (fade in 500 ms, fade out 1000 ms) toggled by one capacitive touch pad, plus a stored touch-enable setting like the lighting node's.
It's a XIAO ESP32-S3 rather than the usual C3, for the touch peripheral the C3 lacks. That surfaced two hardware differences from the lighting node's touch handling (still the only other touch node, on a classic ESP32):
SOC_TOUCH_VERSION_1/_2), not a core version as the code previously assumed —touch_input.cppand theTouchSensorconstructor comment now say so.touchSetCyclesmaps to different units than the classic ESP32's;main.cppsets the core's own S3 defaults (500, 0xF) with a note that they want tuning on the bench.Built
node_kitchen,node_lighting,node_bathroomand ranpio test -e native(437 cases) — all green.clang-format -irun over touched files.No protocol change: the spec already carries the
0x11row andnode_ids.halready listskitchen.Reviewed against
main(basea11d1ac). Builtnode_kitchenand ranpio test -e native(437 cases) — both clean, andclang-format --dry-runis clean on the touched files.main.cppmatches the sibling nodes' pattern closely: endpoint indices, PwmConfig field order (relies correctly on the newfrequencyHz/resolutionBitsdefaults rather than overriding them), the touch setup/enable-gate sequence, and the D7 XIAO bus config all line up withnode_bathroom/node_lighting. Verified the pin choices against the XIAO ESP32S3 variant header: D0 is GPIO1/T1 (touch-capable), D1/D7–D10 are free GPIOs — no conflicts. VerifiedsetTouchCycles(500, 0xF)against the Arduino core's ownTOUCH_PAD_MEASURE_CYCLE_DEFAULT/TOUCH_PAD_SLEEP_CYCLE_DEFAULTforSOC_TOUCH_VERSION_2— they match exactly. The touch-polarity fix intouch_input.cpp/touch_sensor.hstays correctly inside the existing#if defined(ARDUINO)/SOC_TOUCH_SENSOR_NUM > 0guard, doesn't leak into board-agnostic runtime paths, and the corrected constructor comment is accurate.node_ids.h, the spec row and the "Adding a controller" checklist items were all already in place or are now covered by this PR.One thing worth a look:
platformio.ini,[xiao]comment: "Both boards are 4 MB. 1.875 MB an app slot..." is now stale —[env:node_kitchen]overridesboardtoseeed_xiao_esp32s3, which is an 8 MB part (confirmed against the board json), while[lolin32]/thexiaoC3 default are both 4 MB. Not a functional bug:min_spiffs.csvis a fixed 4 MB partition table regardless of chip size, so it still flashes and the 1.875 MB app-slot figure is still correct, it just leaves ~4 MB of the S3's flash unpartitioned. Worth a one-line update to the comment (or a note that the kitchen node has flash to spare) so it doesn't read as "every board here is 4 MB" once a reader hits the S3 override just below it.Minor/optional:
onTouch()'sstrip.setOn(!strip.isOn(), 0, can::Origin::Manual, now)duplicatesLevelEndpoint::manualToggle(uint32_t), which does exactly this. Not introduced by this PR —node_lighting/main.cpp'sonTouch()already does the same longhand thing for its three circuits — so it's an existing convention this branch correctly follows, not a defect. Flagging only in case it's worth adoptingmanualToggle()across all three call sites in a follow-up.Nothing else stood out. Scope, comment density and the
Origin/lockout usage all look right for this repo's conventions.Final pass: the touch-cycles comment in
src/node_kitchen/main.cpp(b778345) reads cleanly now. Nothing else outstanding — clean.