mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-10-31 13:52:15 +01:00
feat: command ops for socket protocol 2
shadeCommand, groupCommand, tiltCommand, repeatCommand, setPositions, setSensor, setMyPosition, unpairShade, setRollingCode (types 16-24) are read on async_tcp by ProtoOps and handed to loop() through the LoopQueue, which replies once the request has run: ok, not found or radio unavailable. A bad payload, a paused radio or a full queue is answered straight away. sendRemoteCommand (25) touches nothing of the shade model, so it goes to the radio from async_tcp like its route. ShadeRequests::run() now says how a request went, not only whether the radio took it. An op reads only the fields that were sent, so setPositions can leave the tilt as it is. The shadeCommand event is renamed shadeCommanded, since the op has the route's name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
9fe05105ff
commit
0b54264ee3
18 changed files with 812 additions and 50 deletions
|
|
@ -45,6 +45,11 @@ static void test_type_numbers_are_unique_and_in_their_sender_range() {
|
|||
else TEST_ASSERT_TRUE_MESSAGE(t.number >= 1, t.name);
|
||||
}
|
||||
}
|
||||
static void test_type_names_are_unique() {
|
||||
// Clients look types up by name.
|
||||
std::set<std::string> names;
|
||||
for(uint8_t i = 0; i < protoTypeCount(); i++) TEST_ASSERT_TRUE_MESSAGE(names.insert(protoTypeAt(i).name).second, protoTypeAt(i).name);
|
||||
}
|
||||
static void test_error_and_feed_numbers_are_unique() {
|
||||
std::set<uint8_t> errors, feeds;
|
||||
for(uint8_t i = 0; i < protoErrorCount(); i++) TEST_ASSERT_TRUE(errors.insert(protoErrorAt(i).number).second);
|
||||
|
|
@ -380,6 +385,7 @@ int main(int argc, char **argv) {
|
|||
RUN_TEST(test_field_keys_and_names_are_unique);
|
||||
RUN_TEST(test_every_field_has_a_known_kind);
|
||||
RUN_TEST(test_type_numbers_are_unique_and_in_their_sender_range);
|
||||
RUN_TEST(test_type_names_are_unique);
|
||||
RUN_TEST(test_error_and_feed_numbers_are_unique);
|
||||
RUN_TEST(test_bootstrap_keys_are_fixed);
|
||||
RUN_TEST(test_schema_hash_is_eight_hex_digits_and_stable);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue