Added fps to MQTT metrics.
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user