Added fps to MQTT metrics.

This commit is contained in:
2019-06-12 20:49:37 +02:00
parent ca980b0c9f
commit 308196d185
3 changed files with 3 additions and 1 deletions

View File

@ -58,7 +58,7 @@ void mqtt_callback(char* original_topic, byte* pl, unsigned int length) {
topic.remove(0, strlen(MQTT_TOPIC)); // Strip MQTT_TOPIC from the beginning
LOG("MQTT * Remaining topic is: "); LOGln(topic.c_str());
if (topic.compareTo("free_heap")==0 || topic.compareTo("uptime")==0 || topic.compareTo("status")==0) {
if (topic.compareTo("free_heap")==0 || topic.compareTo("uptime")==0 || topic.compareTo("status")==0 || topic.compareTo("fps")==0) {
// Ignore our own messages.
return;
}

View File

@ -77,6 +77,7 @@ void loop() {
EVERY_N_SECONDS(15) {
mqtt_publish("free_heap", ESP.getFreeHeap());
mqtt_publish("uptime", millis()/1000);
mqtt_publish("fps", FastLED.getFPS());
}
#endif // MQTT_REPORT_METRICS