ESPSomfy-RTS/test
cjkas 325da6bd9f refactor: send shade and group changes once per loop() pass
The p_* setters and emitState() no longer publish or emit straight away:
they set SHADE_CHANGED_* / GROUP_CHANGED_* bits on the shade or group.
At the end of every loop() pass SomfyShadeController::sendChanges()
publishes the MQTT topics whose bits are set and sends one shadeState or
groupState, then clears the bits. emitState(evt) with an event name and
emitState(num) for one client still go out at once.

publishShadeTopics() (ShadeChanges.cpp, tested natively) writes the topics
from a shade snapshot; publishState() on connect uses it too. That fixes
MQTT position and target, a constant 50 since c94819e, and direction, a
constant 0 on connect. position and tiltPosition are now retained when
they change, as they were on connect, and a group whose flags change sends
one groupState instead of two. somfy_flags_t moves to ShadeTypes.h.

8 new native tests, 327 in all. Flash: esp32devdbg +196 bytes, esp32dev
+228 bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 14:35:26 +02:00
..
stubs refactor: time steps with ElapsedTimer::lap() 2026-10-13 15:39:14 +02:00
test_frame fix: turn a group's sun flag on, not off, for MQTT sunFlag 1 2026-10-12 20:55:21 +02:00
test_json fix: track the JSON length instead of recounting it 2026-10-12 16:04:13 +02:00
test_logging refactor: time steps with ElapsedTimer::lap() 2026-10-13 15:39:14 +02:00
test_loopqueue refactor: carry out shade requests from one module behind a LoopQueue 2026-10-16 09:42:58 +02:00
test_modeleditor refactor: apply shade model edits on loop() through ModelEditor 2026-10-16 14:34:39 +02:00
test_motion fix: default a set-favorite request's tilt to the favorite tilt 2026-10-14 15:57:49 +02:00
test_mqttcommands refactor: carry out shade requests from one module behind a LoopQueue 2026-10-16 09:42:58 +02:00
test_pulse refactor: move the RX pulse decoder into PulseDecoder 2026-10-13 21:21:05 +02:00
test_radioscheduler refactor: name radio jobs as GLOSSARY.md does 2026-10-13 15:13:03 +02:00
test_rollingcode test: cover the radio queue rules, shade TX state, rolling codes and web command hold 2026-10-12 20:26:33 +02:00
test_sensors fix: move only the tilt of a tilt-only shade for sun and wind 2026-10-13 21:14:20 +02:00
test_shadechanges refactor: send shade and group changes once per loop() pass 2026-10-16 14:35:26 +02:00
test_shaderequests refactor: carry out shade requests from one module behind a LoopQueue 2026-10-16 09:42:58 +02:00
test_shadetx test: name the ticket tests as GLOSSARY.md does 2026-10-13 15:35:15 +02:00
test_snapshot refactor: apply shade model edits on loop() through ModelEditor 2026-10-16 14:34:39 +02:00
test_txbuffer fix: keep a repeater frame until the radio queue takes it 2026-10-12 18:31:39 +02:00
test_txjob refactor: let one RadioScheduler own the radio job queue 2026-10-12 20:36:32 +02:00
test_utils test: cover the roam threshold and who gets memStatus 2026-10-13 15:37:12 +02:00