mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
clear devices, move cmds to Admin - https://github.com/proddy/EMS-ESP/pull/451
This commit is contained in:
@@ -193,14 +193,15 @@ void EMSESPShell::add_console_commands() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
commands->add_command(ShellContext::MAIN,
|
commands->add_command(ShellContext::MAIN,
|
||||||
CommandFlags::USER,
|
CommandFlags::ADMIN,
|
||||||
flash_string_vector{F_(scan), F_(devices)},
|
flash_string_vector{F_(scan), F_(devices)},
|
||||||
flash_string_vector{F_(deep_optional)},
|
flash_string_vector{F_(deep_optional)},
|
||||||
[](Shell & shell, const std::vector<std::string> & arguments) {
|
[](Shell & shell, const std::vector<std::string> & arguments) {
|
||||||
if (arguments.size() == 0) {
|
if (arguments.size() == 0) {
|
||||||
EMSESP::send_read_request(EMSdevice::EMS_TYPE_UBADevices, EMSdevice::EMS_DEVICE_ID_BOILER);
|
EMSESP::scan_devices();
|
||||||
} else {
|
} else {
|
||||||
shell.printfln(F("Performing a deep scan..."));
|
shell.printfln(F("Performing a deep scan..."));
|
||||||
|
EMSESP::clear_all_devices();
|
||||||
std::vector<uint8_t> Device_Ids;
|
std::vector<uint8_t> Device_Ids;
|
||||||
|
|
||||||
Device_Ids.push_back(0x08); // Boilers - 0x08
|
Device_Ids.push_back(0x08); // Boilers - 0x08
|
||||||
@@ -372,7 +373,7 @@ void Console::load_standard_commands(unsigned int context) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
EMSESPShell::commands->add_command(context,
|
EMSESPShell::commands->add_command(context,
|
||||||
CommandFlags::USER,
|
CommandFlags::ADMIN,
|
||||||
flash_string_vector{F_(send), F_(telegram)},
|
flash_string_vector{F_(send), F_(telegram)},
|
||||||
flash_string_vector{F_(data_mandatory)},
|
flash_string_vector{F_(data_mandatory)},
|
||||||
[](Shell & shell __attribute__((unused)), const std::vector<std::string> & arguments) {
|
[](Shell & shell __attribute__((unused)), const std::vector<std::string> & arguments) {
|
||||||
|
|||||||
Reference in New Issue
Block a user