Added fps to MQTT metrics.
This commit is contained in:
parent
ca980b0c9f
commit
308196d185
@ -47,5 +47,6 @@ seconds:
|
|||||||
|
|
||||||
* `MQTT_TOPIC/free_heap` contains the free heap memory in Bytes.
|
* `MQTT_TOPIC/free_heap` contains the free heap memory in Bytes.
|
||||||
* `MQTT_TOPIC/uptime` contains the uptime of pitrix in seconds.
|
* `MQTT_TOPIC/uptime` contains the uptime of pitrix in seconds.
|
||||||
|
* `MQTT_TOPIC/fps` contains the currently reached frames per second.
|
||||||
|
|
||||||
If you enabled `DEBUG`, log messages will be sent to `MQTT_TOPIC/log`.
|
If you enabled `DEBUG`, log messages will be sent to `MQTT_TOPIC/log`.
|
||||||
|
@ -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
|
topic.remove(0, strlen(MQTT_TOPIC)); // Strip MQTT_TOPIC from the beginning
|
||||||
|
|
||||||
LOG("MQTT * Remaining topic is: "); LOGln(topic.c_str());
|
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.
|
// Ignore our own messages.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -77,6 +77,7 @@ void loop() {
|
|||||||
EVERY_N_SECONDS(15) {
|
EVERY_N_SECONDS(15) {
|
||||||
mqtt_publish("free_heap", ESP.getFreeHeap());
|
mqtt_publish("free_heap", ESP.getFreeHeap());
|
||||||
mqtt_publish("uptime", millis()/1000);
|
mqtt_publish("uptime", millis()/1000);
|
||||||
|
mqtt_publish("fps", FastLED.getFPS());
|
||||||
}
|
}
|
||||||
#endif // MQTT_REPORT_METRICS
|
#endif // MQTT_REPORT_METRICS
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user