diff --git a/ADIS_ESP32_Eclipse/main/challenge_app.c b/ADIS_ESP32_Eclipse/main/challenge_app.c index a0455bb..860aa03 100644 --- a/ADIS_ESP32_Eclipse/main/challenge_app.c +++ b/ADIS_ESP32_Eclipse/main/challenge_app.c @@ -54,17 +54,12 @@ static void appTask(void *pv){ Challenge_Com_SubscribeToAllTopics(); - MyMqtt_Subscribe("scada/status"); - // endless loop for(;;){ - //MyMqtt_Publish("scada/status", "Testmessage from ESP"); - vTaskDelay(pdMS_TO_TICKS(10000)); } } - ESP_LOGE(TAG, "Challenge Mainloop failure: %s", myMqttInitSuccess==true?"Something in challenge app failed. Re-initializing MQTT in 5s.":"Init of MyMqtt failed! Retrying in 5s."); MyMqtt_Deinit(); if(myMqttInitSuccess == false) { vTaskDelay(5000); } // only wait if the init is the issue diff --git a/ADIS_ESP32_Eclipse/main/myMqtt.c b/ADIS_ESP32_Eclipse/main/myMqtt.c index 2fcfeae..840ddf9 100644 --- a/ADIS_ESP32_Eclipse/main/myMqtt.c +++ b/ADIS_ESP32_Eclipse/main/myMqtt.c @@ -159,6 +159,7 @@ static uint8_t PrintHelp(const McuShell_StdIOType *io) { McuShell_SendHelpStr((unsigned char*)"mqtt", (unsigned char*)"Group of ESP32 MQTT commands\r\n", io->stdOut); McuShell_SendHelpStr((unsigned char*)" help|status", (unsigned char*)"Shows MQTT help or status\r\n", io->stdOut); McuShell_SendHelpStr((unsigned char*)" setIp ", (unsigned char*)"Sets the IP address of the MQTT broker\r\n", io->stdOut); + McuShell_SendHelpStr((unsigned char*)" publish ", (unsigned char*)"Publishes a message to the given topic.\r\n", io->stdOut); return ERR_OK; }