mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-19 01:41:30 +10:00
Targeted build fixes, especially Heltec T1 (#11345)
This commit is contained in:
@@ -1170,7 +1170,7 @@ void UIRenderer::drawDeviceFocused(OLEDDisplay *display, OLEDDisplayUiState *sta
|
||||
// === Node Identity ===
|
||||
int textWidth = 0;
|
||||
int nameX = 0;
|
||||
const char *shortName = owner.short_name ? owner.short_name : "";
|
||||
const char *shortName = owner.short_name[0] ? owner.short_name : "";
|
||||
|
||||
// === ShortName Centered ===
|
||||
textWidth = UIRenderer::measureStringWithEmotes(display, shortName);
|
||||
@@ -1259,7 +1259,7 @@ void UIRenderer::drawDeviceFocused(OLEDDisplay *display, OLEDDisplayUiState *sta
|
||||
int nameX = 0;
|
||||
int yOffset = (currentResolution == ScreenResolution::High) ? 0 : 5;
|
||||
const char *longName = (nodeInfoLiteHasUser(ourNode) && ourNode->long_name[0]) ? ourNode->long_name : "";
|
||||
const char *shortName = owner.short_name ? owner.short_name : "";
|
||||
const char *shortName = owner.short_name[0] ? owner.short_name : "";
|
||||
char combinedName[96];
|
||||
if (longName[0] && shortName[0]) {
|
||||
snprintf(combinedName, sizeof(combinedName), "%s (%s)", longName, shortName);
|
||||
@@ -1444,7 +1444,7 @@ void UIRenderer::drawIconScreen(const char *upperMsg, OLEDDisplay *display, OLED
|
||||
}
|
||||
// Draw version and short name in bottom middle
|
||||
char footer[64];
|
||||
if (owner.short_name && owner.short_name[0]) {
|
||||
if (owner.short_name[0]) {
|
||||
snprintf(footer, sizeof(footer), "%s %s", xstr(APP_VERSION_SHORT), owner.short_name);
|
||||
} else {
|
||||
snprintf(footer, sizeof(footer), "%s", xstr(APP_VERSION_SHORT));
|
||||
@@ -1499,7 +1499,7 @@ void UIRenderer::drawIconScreen(const char *upperMsg, OLEDDisplay *display, OLED
|
||||
if (gBootSplashBoldPass) {
|
||||
display->drawString(versionX + 1, y + 5, version);
|
||||
}
|
||||
if (owner.short_name && owner.short_name[0]) {
|
||||
if (owner.short_name[0]) {
|
||||
const char *shortName = owner.short_name;
|
||||
int shortNameW = UIRenderer::measureStringWithEmotes(display, shortName);
|
||||
int shortNameX = x + SCREEN_WIDTH - shortNameW - 5;
|
||||
@@ -1727,7 +1727,7 @@ void UIRenderer::drawOEMIconScreen(const char *upperMsg, OLEDDisplay *display, O
|
||||
const char *version = xstr(APP_VERSION_SHORT);
|
||||
int versionX = x + SCREEN_WIDTH - display->getStringWidth(version);
|
||||
display->drawString(versionX, y + 0, version);
|
||||
if (owner.short_name && owner.short_name[0]) {
|
||||
if (owner.short_name[0]) {
|
||||
const char *shortName = owner.short_name;
|
||||
int shortNameW = UIRenderer::measureStringWithEmotes(display, shortName);
|
||||
int shortNameX = x + SCREEN_WIDTH - shortNameW;
|
||||
|
||||
Reference in New Issue
Block a user