mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-09 06:32:06 +00:00
No more blinking icons for Eink
This commit is contained in:
parent
2432d0616b
commit
351dff14e8
@ -77,10 +77,12 @@ void drawCommonHeader(OLEDDisplay *display, int16_t x, int16_t y)
|
|||||||
static bool isBoltVisibleShared = true;
|
static bool isBoltVisibleShared = true;
|
||||||
uint32_t now = millis();
|
uint32_t now = millis();
|
||||||
|
|
||||||
|
#ifndef USE_EINK
|
||||||
if (isCharging && now - lastBlinkShared > 500) {
|
if (isCharging && now - lastBlinkShared > 500) {
|
||||||
isBoltVisibleShared = !isBoltVisibleShared;
|
isBoltVisibleShared = !isBoltVisibleShared;
|
||||||
lastBlinkShared = now;
|
lastBlinkShared = now;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
bool useHorizontalBattery = (screenW > 128 && screenW > screenH);
|
bool useHorizontalBattery = (screenW > 128 && screenW > screenH);
|
||||||
const int textY = y + (highlightHeight - FONT_HEIGHT_SMALL) / 2;
|
const int textY = y + (highlightHeight - FONT_HEIGHT_SMALL) / 2;
|
||||||
@ -162,6 +164,7 @@ void drawCommonHeader(OLEDDisplay *display, int16_t x, int16_t y)
|
|||||||
static uint32_t lastMailBlink = 0;
|
static uint32_t lastMailBlink = 0;
|
||||||
bool showMail = false;
|
bool showMail = false;
|
||||||
|
|
||||||
|
#ifndef USE_EINK
|
||||||
if (hasUnreadMessage) {
|
if (hasUnreadMessage) {
|
||||||
if (now - lastMailBlink > 500) {
|
if (now - lastMailBlink > 500) {
|
||||||
isMailIconVisible = !isMailIconVisible;
|
isMailIconVisible = !isMailIconVisible;
|
||||||
@ -169,6 +172,11 @@ void drawCommonHeader(OLEDDisplay *display, int16_t x, int16_t y)
|
|||||||
}
|
}
|
||||||
showMail = isMailIconVisible;
|
showMail = isMailIconVisible;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
if (hasUnreadMessage) {
|
||||||
|
showMail = true;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (showMail) {
|
if (showMail) {
|
||||||
if (useHorizontalBattery) {
|
if (useHorizontalBattery) {
|
||||||
|
Loading…
Reference in New Issue
Block a user