mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
set telnet timeout from console
This commit is contained in:
@@ -300,6 +300,16 @@ void EMSESPShell::add_console_commands() {
|
|||||||
"local");
|
"local");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
commands->add_command(ShellContext::MAIN,
|
||||||
|
CommandFlags::USER,
|
||||||
|
flash_string_vector{F_(set), F_(timeout)},
|
||||||
|
flash_string_vector{F_(n_mandatory)},
|
||||||
|
[](Shell & shell, const std::vector<std::string> & arguments) {
|
||||||
|
uint16_t value = Helpers::atoint(arguments.front().c_str());
|
||||||
|
telnet_.initial_idle_timeout(value * 60);
|
||||||
|
shell.printfln(F("Telnet timout is %d minutes"), value);
|
||||||
|
});
|
||||||
|
|
||||||
commands->add_command(ShellContext::MAIN,
|
commands->add_command(ShellContext::MAIN,
|
||||||
CommandFlags::ADMIN,
|
CommandFlags::ADMIN,
|
||||||
flash_string_vector{F_(send), F_(telegram)},
|
flash_string_vector{F_(send), F_(telegram)},
|
||||||
|
|||||||
Reference in New Issue
Block a user