Стартовый экран: версия MeshCore, MESHINFO и meshinfo.ru вместо даты сборки

This commit is contained in:
shade committed 2026-10-12 08:02:35 +03:00
1 parent 745c8cccdd
commit e110fd87a8
10 files changed
+105 -41

No files matched your search

+17 -11
View File
@@ -9,6 +9,11 @@
#define AUTO_OFF_MILLIS 20000 // 20 seconds
#define BOOT_SCREEN_MILLIS 4000 // 4 seconds
// версия форка MESHINFO (в сборке задаётся как -DMESHINFO_VERSION=\"v0.1.0\")
#ifndef MESHINFO_VERSION
#define MESHINFO_VERSION "dev"
#endif
// 'meshcore', 128x13px
static const uint8_t meshcore_logo [] PROGMEM = {
0x3c, 0x01, 0xe3, 0xff, 0xc7, 0xff, 0x8f, 0x03, 0x87, 0xfe, 0x1f, 0xfe, 0x1f, 0xfe, 0x1f, 0xfe,
@@ -40,8 +45,9 @@ void UITask::begin(NodePrefs* node_prefs, const char* build_date, const char* fi
*dash = 0;
}
// v1.2.3 (1 Jan 2025)
snprintf(_version_info, sizeof(_version_info), "%s (%s)", version, build_date);
// дату сборки на стартовом экране не показываем — только версия MeshCore
(void)build_date;
snprintf(_version_info, sizeof(_version_info), "%s", version);
free(version);
}
@@ -61,17 +67,17 @@ void UITask::renderCurrScreen() {
_display->setCursor((_display->width() - websiteWidth) / 2, 22);
_display->print(website);
// version info
// версия MeshCore
_display->setTextSize(1);
uint16_t versionWidth = _display->getTextWidth(_version_info);
_display->setCursor((_display->width() - versionWidth) / 2, 35);
_display->print(_version_info);
_display->drawTextCentered(_display->width() / 2, 31, _version_info);
// node type
const char* node_type = "< Sensor >";
uint16_t typeWidth = _display->getTextWidth(node_type);
_display->setCursor((_display->width() - typeWidth) / 2, 48);
_display->print(node_type);
// версия форка и его сайт
char meshinfo[24];
snprintf(meshinfo, sizeof(meshinfo), "MESHINFO %s", MESHINFO_VERSION);
_display->setColor(UIColor::warning_txt);
_display->drawTextCentered(_display->width() / 2, 41, meshinfo);
_display->setColor(UIColor::secondary_txt);
_display->drawTextCentered(_display->width() / 2, 51, "meshinfo.ru");
} else { // home screen
// node name
_display->setCursor(0, 0);