mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
compile with limited set of tests (flash mem overload)
This commit is contained in:
@@ -29,6 +29,7 @@ bool Test::run_test(const char * command, int8_t id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(command, "general") == 0) {
|
||||
EMSESP::logger().info("Testing general. Adding a Boiler and Thermostat");
|
||||
|
||||
@@ -53,6 +54,8 @@ bool Test::run_test(const char * command, int8_t id) {
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifndef EMSESP_DEBUG_LIMITED
|
||||
|
||||
if (strcmp(command, "2thermostats") == 0) {
|
||||
EMSESP::logger().info("Testing with multiple thermostats...");
|
||||
|
||||
@@ -216,6 +219,8 @@ bool Test::run_test(const char * command, int8_t id) {
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -231,6 +236,9 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const
|
||||
EMSESP::watch(EMSESP::Watch::WATCH_RAW); // raw
|
||||
|
||||
std::string command(20, '\0');
|
||||
|
||||
#ifndef EMSESP_DEBUG_LIMITED
|
||||
|
||||
if ((cmd.empty()) || (cmd == "default")) {
|
||||
command = EMSESP_DEBUG_DEFAULT;
|
||||
} else {
|
||||
@@ -1548,6 +1556,14 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if (command == "limited") {
|
||||
shell.printfln("Run a limited memory test...");
|
||||
|
||||
run_test("general");
|
||||
}
|
||||
}
|
||||
|
||||
// simulates a telegram in the Rx queue, but without the CRC which is added automatically
|
||||
|
||||
Reference in New Issue
Block a user