minor changes, added gpio command - #445

This commit is contained in:
proddy
2020-08-04 13:34:16 +02:00
parent 725d63a518
commit 939debdc0b
8 changed files with 65 additions and 33 deletions

View File

@@ -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..."));