disable uptime msg

master
Eggert Jung 4 years ago
parent 858fcd1547
commit c4fe5df4af

@ -196,7 +196,7 @@ int main()
else else
{ {
printf("--MQTT Connected ERROR: %ld\r\n", mqtt_rc); printf("--MQTT Connected ERROR: %ld\r\n", mqtt_rc);
//while(1); //Reboot the board while(1); //Reboot the board
} }
char SubString[] = "/Filamentanlage/04_Messmodul/set/#"; char SubString[] = "/Filamentanlage/04_Messmodul/set/#";
@ -236,12 +236,12 @@ int main()
#if PLC_MQTT_ENABLED #if PLC_MQTT_ENABLED
// send misc info // send misc info
if(millis() - timer_send_uptime > 5000){ //if(millis() - timer_send_uptime > 5000){
timer_send_uptime += 5000; // timer_send_uptime += 5000;
char msg[64]; // char msg[64];
sprintf(msg, "%ld", millis()/1000); // sprintf(msg, "%ld", millis()/1000);
mqtt_pub(&mqtt_client, "/Filamentanlage/04_Messmodul/state/uptime", msg, strlen(msg)); // mqtt_pub(&mqtt_client, "/Filamentanlage/04_Messmodul/state/uptime", msg, strlen(msg));
} //}
#endif #endif
if(millis() - timer_modbus_poll > 1000){ if(millis() - timer_modbus_poll > 1000){
timer_modbus_poll += 1000; timer_modbus_poll += 1000;