Browse Source

Customize GET terminal command

fastled^2
Maxim Prokhorov 6 years ago
parent
commit
fa40633996
1 changed files with 19 additions and 0 deletions
  1. +19
    -0
      code/espurna/settings.ino

+ 19
- 0
code/espurna/settings.ino View File

@ -269,6 +269,25 @@ void _settingsInitCommands() {
DEBUG_MSG_P(PSTR("+OK\n"));
});
settingsRegisterCommand(F("GET"), [](Embedis* e) {
if (e->argc < 2) {
DEBUG_MSG_P(PSTR("-ERROR: Wrong arguments\n"));
return;
}
for (unsigned char i = 1; i < e->argc; i++) {
String key = String(e->argv[i]);
String value;
if (!Embedis::get(key, value)) {
DEBUG_MSG_P(PSTR("-ERROR: Unknown key: %s\n"), key.c_str());
}
DEBUG_MSG_P(PSTR("> %s => %s\n"), key.c_str(), value.c_str());
}
DEBUG_MSG_P(PSTR("+OK\n"));
});
settingsRegisterCommand(F("RELOAD"), [](Embedis* e) {
wsReload();
DEBUG_MSG_P(PSTR("+OK\n"));


Loading…
Cancel
Save