mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-02 10:16:11 +00:00
feat: blinking ~ indicator in status bar when auto-advert is active
Blinks at 4Hz (250ms toggle) with inverted background so it's clearly visible without being distracting. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
e43047f561
commit
e38dc87c25
@@ -1798,6 +1798,14 @@ public:
|
|||||||
display.translateUTF8ToBlocks(filtered_name, _node_prefs->node_name, sizeof(filtered_name));
|
display.translateUTF8ToBlocks(filtered_name, _node_prefs->node_name, sizeof(filtered_name));
|
||||||
display.setCursor(0, 0);
|
display.setCursor(0, 0);
|
||||||
display.print(filtered_name);
|
display.print(filtered_name);
|
||||||
|
if (_node_prefs->advert_auto_interval_sec > 0 && (millis() / 250) % 2) {
|
||||||
|
int ax = display.getTextWidth(filtered_name);
|
||||||
|
display.fillRect(ax, 0, display.getTextWidth("~") + 1, 9);
|
||||||
|
display.setColor(DisplayDriver::DARK);
|
||||||
|
display.setCursor(ax, 0);
|
||||||
|
display.print("~");
|
||||||
|
display.setColor(DisplayDriver::LIGHT);
|
||||||
|
}
|
||||||
renderBatteryIndicator(display, _task->getBattMilliVolts());
|
renderBatteryIndicator(display, _task->getBattMilliVolts());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user