mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-10-31 22:02:17 +01:00
fix: update every group's flags after a group's sun flag command
A SunFlag or Flag frame makes every group work its flags out again, but the same command from a group only updated that group, so other groups holding the shade kept stale sun flags. The group rule now reports the sensor flags as the frame rule does. Reconcile Q20 in SHADE_BEHAVIOUR_PLAN.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
2cf3c4b542
commit
4eff50645d
3 changed files with 9 additions and 4 deletions
|
|
@ -522,9 +522,11 @@ static void test_group_sun_flag_needs_a_sensor() {
|
|||
r.b.onGroupCommand(somfy_commands::SunFlag, 1, r.now);
|
||||
TEST_ASSERT_TRUE(r.st().stateFlags & static_cast<uint8_t>(somfy_flags_t::SunFlag));
|
||||
TEST_ASSERT_EQUAL(1, r.events.saves);
|
||||
// today: unlike the frame rule, the group rule doesn't ask for the group
|
||||
// flags to be worked out again; SomfyGroup does that for its own group.
|
||||
TEST_ASSERT_EQUAL(0, r.events.sensorFlags);
|
||||
// As for a frame, every group works its flags out again.
|
||||
TEST_ASSERT_EQUAL(1, r.events.sensorFlags);
|
||||
r.b.onGroupCommand(somfy_commands::Flag, 1, r.now);
|
||||
TEST_ASSERT_FALSE(r.st().stateFlags & static_cast<uint8_t>(somfy_flags_t::SunFlag));
|
||||
TEST_ASSERT_EQUAL(2, r.events.sensorFlags);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue