From c3a518998b0b278eeb281164747609bafaa5f1af Mon Sep 17 00:00:00 2001 From: Tester23 Date: Sun, 20 Oct 2024 10:31:15 +0200 Subject: [PATCH] add stubs for commands handled elsewhere so they dont error --- sdk/OpenW600 | 2 +- sdk/OpenW800 | 2 +- src/cmnds/cmd_tasmota.c | 19 ++++++++++++++++--- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/sdk/OpenW600 b/sdk/OpenW600 index 8111457a6..ad8f51d06 160000 --- a/sdk/OpenW600 +++ b/sdk/OpenW600 @@ -1 +1 @@ -Subproject commit 8111457a6f988e80a9801772d244d1c586590292 +Subproject commit ad8f51d064a78465ec1845287cf19c3a24c655b8 diff --git a/sdk/OpenW800 b/sdk/OpenW800 index d345661b0..bc2c41e02 160000 --- a/sdk/OpenW800 +++ b/sdk/OpenW800 @@ -1 +1 @@ -Subproject commit d345661b0a0639cde8a18a2ceec147f6ad1a1e5c +Subproject commit bc2c41e0271f1018bdb66cebddf592de7b7a571d diff --git a/src/cmnds/cmd_tasmota.c b/src/cmnds/cmd_tasmota.c index 16004f819..0d94a073a 100644 --- a/src/cmnds/cmd_tasmota.c +++ b/src/cmnds/cmd_tasmota.c @@ -363,7 +363,7 @@ static commandResult_t cmnd_MqttClient(const void * context, const char *cmd, co CFG_SetMQTTClientId(Tokenizer_GetArg(0)); return CMD_RES_OK; } -static commandResult_t cmnd_State(const void * context, const char *cmd, const char *args, int cmdFlags) { +static commandResult_t cmnd_stub(const void * context, const char *cmd, const char *args, int cmdFlags) { return CMD_RES_OK; } @@ -429,10 +429,23 @@ int taslike_commands_init(){ //cmddetail:"fn":"cmnd_MqttClient","file":"cmnds/cmd_tasmota.c","requires":"", //cmddetail:"examples":""} CMD_RegisterCommand("MqttClient", cmnd_MqttClient, NULL); + + // those are stubs, they are handled elsewhere so we can have Tasmota style replies + //cmddetail:{"name":"State","args":"NULL", //cmddetail:"descr":"NULL", - //cmddetail:"fn":"cmnd_State","file":"cmnds/cmd_tasmota.c","requires":"", + //cmddetail:"fn":"cmnd_stub","file":"cmnds/cmd_tasmota.c","requires":"", + //cmddetail:"examples":""} + CMD_RegisterCommand("State", cmnd_stub, NULL); + //cmddetail:{"name":"Sensor","args":"NULL", + //cmddetail:"descr":"NULL", + //cmddetail:"fn":"cmnd_stub","file":"cmnds/cmd_tasmota.c","requires":"", + //cmddetail:"examples":""} + CMD_RegisterCommand("Sensor", cmnd_stub, NULL); + //cmddetail:{"name":"Status","args":"NULL", + //cmddetail:"descr":"NULL", + //cmddetail:"fn":"cmnd_stub","file":"cmnds/cmd_tasmota.c","requires":"", //cmddetail:"examples":""} - CMD_RegisterCommand("State", cmnd_State, NULL); + CMD_RegisterCommand("Status", cmnd_stub, NULL); return 0; }