mirror of
https://github.com/xoseperez/espurna.git
synced 2026-03-04 15:34:19 +01:00
debug: rework boot info and terminal commands
- reduce info lines on boot - more compact `info` command. show versions, modules and crash info when there is one - add `storage` command to display flash layout (experimental) - display full chip id aka MAC, including the oui - fix telnet never printing the crash data b/c telnet in not yet authorized - fix eeprom size not reflecting the space used by the backup sectors - use static flash strings when possible for the fw info
This commit is contained in:
@@ -239,8 +239,8 @@ void _onDiscover(AsyncWebServerRequest *request) {
|
||||
StaticJsonBuffer<JSON_OBJECT_SIZE(4)> jsonBuffer;
|
||||
JsonObject &root = jsonBuffer.createObject();
|
||||
root["app"] = APP_NAME;
|
||||
root["version"] = getVersion().c_str();
|
||||
root["device"] = device.c_str();
|
||||
root["version"] = getVersion();
|
||||
root["device"] = device;
|
||||
root["hostname"] = hostname.c_str();
|
||||
|
||||
AsyncResponseStream *response = request->beginResponseStream("application/json", root.measureLength() + 1);
|
||||
@@ -267,7 +267,7 @@ void _onGetConfig(AsyncWebServerRequest *request) {
|
||||
response->addHeader("X-Frame-Options", "deny");
|
||||
|
||||
response->printf("{\n\"app\": \"" APP_NAME "\"");
|
||||
response->printf(",\n\"version\": \"%s\"", getVersion().c_str());
|
||||
response->printf(",\n\"version\": \"%s\"", getVersion());
|
||||
response->printf(",\n\"backup\": \"1\"");
|
||||
#if NTP_SUPPORT
|
||||
response->printf(",\n\"timestamp\": \"%s\"", ntpDateTime().c_str());
|
||||
|
||||
Reference in New Issue
Block a user