mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-27 15:28:11 +00:00
fix: auto-advert indicator - inverted A, 50% duty 1s blink, 1s refresh
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1798,8 +1798,15 @@ public:
|
||||
display.translateUTF8ToBlocks(filtered_name, _node_prefs->node_name, sizeof(filtered_name));
|
||||
display.setCursor(0, 0);
|
||||
display.print(filtered_name);
|
||||
if (_node_prefs->advert_auto_interval_sec > 0 && (millis() % 2000) < 500) {
|
||||
display.print(" A");
|
||||
if (_node_prefs->advert_auto_interval_sec > 0 && (millis() % 1000) < 500) {
|
||||
int spaceW = display.getTextWidth(" ");
|
||||
int aW = display.getTextWidth("A");
|
||||
int ax = display.getTextWidth(filtered_name) + spaceW;
|
||||
display.fillRect(ax, 0, aW + 1, 8);
|
||||
display.setColor(DisplayDriver::DARK);
|
||||
display.setCursor(ax, 0);
|
||||
display.print("A");
|
||||
display.setColor(DisplayDriver::LIGHT);
|
||||
}
|
||||
renderBatteryIndicator(display, _task->getBattMilliVolts());
|
||||
}
|
||||
@@ -2139,9 +2146,9 @@ public:
|
||||
bool auto_adv = _node_prefs && _node_prefs->advert_auto_interval_sec > 0;
|
||||
if (_page == HomePage::CLOCK) {
|
||||
bool show_sec = !_node_prefs || !_node_prefs->clock_hide_seconds;
|
||||
return auto_adv ? 500 : (show_sec ? 1000 : 60000);
|
||||
return (auto_adv || show_sec) ? 1000 : 60000;
|
||||
}
|
||||
return auto_adv ? 500 : 5000;
|
||||
return auto_adv ? 1000 : 5000;
|
||||
}
|
||||
|
||||
bool handleInput(char c) override {
|
||||
|
||||
Reference in New Issue
Block a user