Skip to content

Commit

Permalink
add stubs for commands handled elsewhere so they dont error
Browse files Browse the repository at this point in the history
  • Loading branch information
openshwprojects committed Oct 20, 2024
1 parent b2b4d2b commit c3a5189
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sdk/OpenW600
Submodule OpenW600 updated 1 files
+112 −1 app/Makefile
2 changes: 1 addition & 1 deletion sdk/OpenW800
Submodule OpenW800 updated 1 files
+58 −1 app/Makefile
19 changes: 16 additions & 3 deletions src/cmnds/cmd_tasmota.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}

0 comments on commit c3a5189

Please sign in to comment.