mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
minor changes, added gpio command - #445
This commit is contained in:
@@ -28,7 +28,7 @@ namespace emsesp {
|
||||
// used with the 'test' command, under su/admin
|
||||
void Test::run_test(uuid::console::Shell & shell, const std::string & command) {
|
||||
if (command == "default") {
|
||||
run_test(shell, "mqtt"); // add the default test case here
|
||||
run_test(shell, "gpio"); // add the default test case here
|
||||
}
|
||||
|
||||
if (command.empty()) {
|
||||
@@ -480,6 +480,19 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & command) {
|
||||
EMSESP::txservice_.flush_tx_queue();
|
||||
}
|
||||
|
||||
if (command == "gpio") {
|
||||
shell.printfln(F("Testing gpio..."));
|
||||
|
||||
EMSESP::add_context_menus(); // need to add this as it happens later in the code
|
||||
shell.invoke_command("su");
|
||||
shell.invoke_command("system");
|
||||
shell.invoke_command("help");
|
||||
shell.invoke_command("gpio");
|
||||
shell.invoke_command("gpio 1 true");
|
||||
|
||||
shell.loop_all();
|
||||
}
|
||||
|
||||
if (command == "mqtt") {
|
||||
shell.printfln(F("Testing MQTT..."));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user