Skip to content

Commit

Permalink
Added config command that outputs the configuration in JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
xoseperez committed Sep 14, 2018
1 parent a0105ce commit 5b62978
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions code/espurna/settings.ino
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,16 @@ void _settingsInitCommands() {
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"));
});

}

// -----------------------------------------------------------------------------
Expand Down

0 comments on commit 5b62978

Please sign in to comment.