Browse Source

Added config command that outputs the configuration in JSON

webui
Xose Pérez 6 years ago
parent
commit
5b62978d09
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      code/espurna/settings.ino

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

@ -298,6 +298,16 @@ void _settingsInitCommands() {
DEBUG_MSG_P(PSTR("+OK\n")); DEBUG_MSG_P(PSTR("+OK\n"));
}); });
settingsRegisterCommand(F("CONFIG"), [](Embedis* e) {
DynamicJsonBuffer jsonBuffer;
JsonObject& root = jsonBuffer.createObject();
settingsGetJson(root);
String output;
root.printTo(output);
DEBUG_MSG(output.c_str());
DEBUG_MSG_P(PSTR("\n+OK\n"));
});
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------


Loading…
Cancel
Save