Implement isHighResolution in place of SCREEN_WIDTH > 128 checks

This commit is contained in:
Jason P
2025-06-22 19:54:47 -05:00
parent d3e56ea084
commit 2de08bebdc
11 changed files with 66 additions and 68 deletions

View File

@@ -154,7 +154,7 @@ int CannedMessageModule::splitConfiguredMessages()
}
void CannedMessageModule::drawHeader(OLEDDisplay *display, int16_t x, int16_t y, char *buffer)
{
if (display->getWidth() > 128) {
if (graphics::isHighResolution) {
if (this->dest == NODENUM_BROADCAST) {
display->drawStringf(x, y, buffer, "To: Broadcast@%s", channels.getName(this->channel));
} else {

View File

@@ -358,7 +358,7 @@ void EnvironmentTelemetryModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiSt
int line = 1;
// === Set Title
const char *titleStr = (SCREEN_WIDTH > 128) ? "Environment" : "Env.";
const char *titleStr = (graphics::isHighResolution) ? "Environment" : "Env.";
// === Header ===
graphics::drawCommonHeader(display, x, y, titleStr);

View File

@@ -115,7 +115,7 @@ void PowerTelemetryModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *s
int line = 1;
// === Set Title
const char *titleStr = (SCREEN_WIDTH > 128) ? "Power Telem." : "Power";
const char *titleStr = (graphics::isHighResolution) ? "Power Telem." : "Power";
// === Header ===
graphics::drawCommonHeader(display, x, y, titleStr);