mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-14 07:21:30 +10:00
Full T-echo card support + Compact UI (#11342)
* T-echo card * Update NRF52I2SOutput.cpp * Update NRF52I2SOutput.h * cleanup * Update buzz.cpp * use consistent runtime compact-panel check instead of mixing with compile-time macro * Update NodeDB.cpp * Update ExternalNotificationModule.cpp * switched to Throttle::isWithinTimespanMs * Update SharedUIDisplay.h * trunk fix * last cleanup * ClockRenderer.cpp for OLED_COMPACT_UI and setup Unit C6L for new UI. * Fixed regressions in standard OLED and TFT --------- Co-authored-by: Jason P <applewiz@mac.com>
This commit is contained in:
@@ -117,6 +117,11 @@ void drawCommonHeader(OLEDDisplay *display, int16_t x, int16_t y, const char *ti
|
||||
|
||||
const int screenW = display->getWidth();
|
||||
const int screenH = display->getHeight();
|
||||
// Compact panels: no persistent header, see UIRenderer::drawNavigationBar instead.
|
||||
if (isCompactPanel(display)) {
|
||||
display->setColor(WHITE); // Reset for other UI - normally done at the end of this function
|
||||
return;
|
||||
}
|
||||
const int headerHeight = highlightHeight + 2;
|
||||
// Color TFT headers use a fixed dark background + white glyphs.
|
||||
// Keep legacy inverted bitmap behavior only for monochrome displays.
|
||||
@@ -537,7 +542,13 @@ const int *getTextPositions(OLEDDisplay *display)
|
||||
{
|
||||
static int textPositions[7]; // Static array that persists beyond function scope
|
||||
|
||||
if (currentResolution == ScreenResolution::High) {
|
||||
if (isCompactPanel(display)) {
|
||||
// No header on compact panels - pack rows as tight as the font allows.
|
||||
for (int i = 0; i < 7; ++i) {
|
||||
const int bodyLine = (i > 0) ? i - 1 : 0;
|
||||
textPositions[i] = bodyLine * (FONT_HEIGHT_SMALL - 6);
|
||||
}
|
||||
} else if (currentResolution == ScreenResolution::High) {
|
||||
textPositions[0] = textZeroLine;
|
||||
textPositions[1] = textFirstLine_medium;
|
||||
textPositions[2] = textSecondLine_medium;
|
||||
@@ -562,6 +573,11 @@ const int *getTextPositions(OLEDDisplay *display)
|
||||
// *************************
|
||||
void drawCommonFooter(OLEDDisplay *display, int16_t x, int16_t y)
|
||||
{
|
||||
if (isCompactPanel(display)) {
|
||||
display->setColor(WHITE); // Reset for other UI - normally done at the end of this function
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isAPIConnected(service->api_state))
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user