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:
Maxim Prokhorov
2021-04-07 03:24:21 +03:00
parent 0ee55ba5c0
commit 7ea735548b
18 changed files with 657 additions and 960 deletions

View File

@@ -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());