Skip to content

Commit

Permalink
Small update to MQTT console
Browse files Browse the repository at this point in the history
  • Loading branch information
steadramon committed Aug 18, 2024
1 parent 7641403 commit 2cab255
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ESPGeiger/src/Mqtt/MQTT_Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ void MQTT_Client::loop(unsigned long now)
doc["free_mem"] = ESP.getFreeHeap();
#endif
serializeJson(doc, buffer);
Log::console(PSTR("MQTT: %s"), buffer);
Log::console(PSTR("MQTT: Published"));

mqttClient->publish(buildTopic(teleTopic, topicStatus).c_str(), 1, false, buffer);
status.last_send = now;
status.last_send = millis();
}

if (now - lastPing > pingInterval)
Expand All @@ -166,7 +166,7 @@ void MQTT_Client::loop(unsigned long now)
mqttClient->publish(buildTopic(statTopic, PSTR("HV")).c_str(), 1, false, String(status.hvReading.get()).c_str());
#endif

status.last_send = now;
status.last_send = millis();
}
if (gcounter.is_warning() != warnSent) {
warnSent = gcounter.is_warning();
Expand Down

0 comments on commit 2cab255

Please sign in to comment.