mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-22 17:34:25 +00:00
Merge branch 'master' into develop
This commit is contained in:
commit
2ef5b968f9
@ -1 +1 @@
|
|||||||
Subproject commit 945b796a982f38171a9e0d28b5c8b1f7d53c5cd1
|
Subproject commit 27d9a99bd03efe35f91cafd7116c2386be5e26a1
|
@ -190,6 +190,7 @@ void drawDigitalClockFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int1
|
|||||||
const char *titleStr = "";
|
const char *titleStr = "";
|
||||||
// === Header ===
|
// === Header ===
|
||||||
graphics::drawCommonHeader(display, x, y, titleStr, true, true);
|
graphics::drawCommonHeader(display, x, y, titleStr, true, true);
|
||||||
|
int line = 0;
|
||||||
|
|
||||||
#ifdef T_WATCH_S3
|
#ifdef T_WATCH_S3
|
||||||
if (nimbleBluetooth && nimbleBluetooth->isConnected()) {
|
if (nimbleBluetooth && nimbleBluetooth->isConnected()) {
|
||||||
@ -299,6 +300,15 @@ void drawDigitalClockFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int1
|
|||||||
display->drawString(startingHourMinuteTextX + timeStringWidth - xOffset, (display->getHeight() - hourMinuteTextY) - yOffset,
|
display->drawString(startingHourMinuteTextX + timeStringWidth - xOffset, (display->getHeight() - hourMinuteTextY) - yOffset,
|
||||||
secondString);
|
secondString);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Display GPS derived date
|
||||||
|
char datetimeStr[25];
|
||||||
|
UIRenderer::formatDateTime(datetimeStr, sizeof(datetimeStr), rtc_sec, display, false);
|
||||||
|
char fullLine[40];
|
||||||
|
snprintf(fullLine, sizeof(fullLine), "%s", datetimeStr);
|
||||||
|
yOffset = (isHighResolution) ? 12 : 1;
|
||||||
|
display->drawString(startingHourMinuteTextX + timeStringWidth - display->getStringWidth(fullLine),
|
||||||
|
getTextPositions(display)[line] + yOffset, fullLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
void drawBluetoothConnectedIcon(OLEDDisplay *display, int16_t x, int16_t y)
|
void drawBluetoothConnectedIcon(OLEDDisplay *display, int16_t x, int16_t y)
|
||||||
@ -314,6 +324,7 @@ void drawAnalogClockFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16
|
|||||||
const char *titleStr = "";
|
const char *titleStr = "";
|
||||||
// === Header ===
|
// === Header ===
|
||||||
graphics::drawCommonHeader(display, x, y, titleStr, true, true);
|
graphics::drawCommonHeader(display, x, y, titleStr, true, true);
|
||||||
|
int line = 0;
|
||||||
|
|
||||||
#ifdef T_WATCH_S3
|
#ifdef T_WATCH_S3
|
||||||
if (nimbleBluetooth && nimbleBluetooth->isConnected()) {
|
if (nimbleBluetooth && nimbleBluetooth->isConnected()) {
|
||||||
@ -511,6 +522,19 @@ void drawAnalogClockFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16
|
|||||||
// draw second hand
|
// draw second hand
|
||||||
display->drawLine(centerX, centerY, secondX, secondY);
|
display->drawLine(centerX, centerY, secondX, secondY);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
display->setFont(FONT_SMALL);
|
||||||
|
// Display GPS derived date
|
||||||
|
char datetimeStr[25];
|
||||||
|
UIRenderer::formatDateTime(datetimeStr, sizeof(datetimeStr), rtc_sec, display, false);
|
||||||
|
char fullLine[40];
|
||||||
|
if (isHighResolution) {
|
||||||
|
snprintf(fullLine, sizeof(fullLine), "%s", datetimeStr);
|
||||||
|
} else {
|
||||||
|
snprintf(fullLine, sizeof(fullLine), "%s", &datetimeStr[2]);
|
||||||
|
}
|
||||||
|
display->drawString(display->getWidth() - 1 - display->getStringWidth(fullLine), getTextPositions(display)[line],
|
||||||
|
fullLine);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -447,7 +447,7 @@ void drawLoRaFocused(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x,
|
|||||||
display->drawString(nameX, getTextPositions(display)[line++], frequencyslot);
|
display->drawString(nameX, getTextPositions(display)[line++], frequencyslot);
|
||||||
|
|
||||||
#if !defined(M5STACK_UNITC6L)
|
#if !defined(M5STACK_UNITC6L)
|
||||||
// === Fourth Row: Channel Utilization ===
|
// === Fifth Row: Channel Utilization ===
|
||||||
const char *chUtil = "ChUtil:";
|
const char *chUtil = "ChUtil:";
|
||||||
char chUtilPercentage[10];
|
char chUtilPercentage[10];
|
||||||
snprintf(chUtilPercentage, sizeof(chUtilPercentage), "%2.0f%%", airTime->channelUtilizationPercent());
|
snprintf(chUtilPercentage, sizeof(chUtilPercentage), "%2.0f%%", airTime->channelUtilizationPercent());
|
||||||
|
Loading…
Reference in New Issue
Block a user