fix: crash if GIF version is 87a (#1194)

* fix: no tool call reply after self.reboot

* fix: 87a gif error

* append display info to board info
This commit is contained in:
Xiaoxia
2025-09-13 16:53:10 +08:00
committed by GitHub
parent d0ba3a923c
commit ae40f72a39
4 changed files with 34 additions and 16 deletions

View File

@@ -2,6 +2,7 @@
#include "system_info.h"
#include "settings.h"
#include "display/display.h"
#include "display/oled_display.h"
#include "assets/lang_config.h"
#include <esp_log.h>
@@ -154,6 +155,21 @@ std::string Board::GetSystemInfoJson() {
json += R"("label":")" + std::string(ota_partition->label) + R"(")";
json += R"(},)";
// Append display info
auto display = GetDisplay();
if (display) {
json += R"("display":{)";
if (dynamic_cast<OledDisplay*>(display)) {
json += R"("monochrome":)" + std::string("true") + R"(,)";
} else {
json += R"("monochrome":)" + std::string("false") + R"(,)";
}
json += R"("width":)" + std::to_string(display->width()) + R"(,)";
json += R"("height":)" + std::to_string(display->height()) + R"(,)";
json.pop_back(); // Remove the last comma
}
json += R"(},)";
json += R"("board":)" + GetBoardJson();
// Close the JSON object