disable uptime msg
This commit is contained in:
14
main.c
14
main.c
@@ -196,7 +196,7 @@ int main()
|
||||
else
|
||||
{
|
||||
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/#";
|
||||
@@ -236,12 +236,12 @@ int main()
|
||||
|
||||
#if PLC_MQTT_ENABLED
|
||||
// send misc info
|
||||
if(millis() - timer_send_uptime > 5000){
|
||||
timer_send_uptime += 5000;
|
||||
char msg[64];
|
||||
sprintf(msg, "%ld", millis()/1000);
|
||||
mqtt_pub(&mqtt_client, "/Filamentanlage/04_Messmodul/state/uptime", msg, strlen(msg));
|
||||
}
|
||||
//if(millis() - timer_send_uptime > 5000){
|
||||
// timer_send_uptime += 5000;
|
||||
// char msg[64];
|
||||
// sprintf(msg, "%ld", millis()/1000);
|
||||
// mqtt_pub(&mqtt_client, "/Filamentanlage/04_Messmodul/state/uptime", msg, strlen(msg));
|
||||
//}
|
||||
#endif
|
||||
if(millis() - timer_modbus_poll > 1000){
|
||||
timer_modbus_poll += 1000;
|
||||
|
||||
Reference in New Issue
Block a user