Added tests. Start them by sending a message to MQTT_TOPIC/run_tests. First test will test all effects for memory leaks.

This commit is contained in:
2019-06-19 22:26:38 +02:00
parent 0163bbef6c
commit 26df11fc47
6 changed files with 68 additions and 27 deletions

View File

@ -10,6 +10,7 @@
#include "Effect.h"
#include "effects.h"
#include "functions.h"
#include "tests.h"
WiFiClient wifi;
PubSubClient mqtt_client(wifi);
@ -63,6 +64,9 @@ void mqtt_callback(char* original_topic, byte* pl, unsigned int length) {
LOGln("MQTT * Rebooting");
ESP.restart();
return; // Will never be reached, but anyway...
} else if (topic.compareTo("run_tests")==0) {
tests::run();
return;
}
long value = payload.toInt();
LOGln("MQTT * Payload as number: %d", value);