mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-07 20:56:11 +00:00
fix(repeater): hide name-bar power readout while APC is suppressed
The name-bar live-power readout was gated on the raw tx_apc pref, so after an upgrade with Auto pwr previously on, it kept showing a power value while the repeater was active — looking like APC was running even though it's forced off and power is pinned to the ceiling. Gate it on apcActive() instead (now public), matching the "--" lock in Settings. The radio page's TX line still shows the actual power, as before. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
885662beae
commit
11a3799a47
@@ -542,7 +542,11 @@ public:
|
||||
display.translateUTF8ToBlocks(filtered_name, _node_prefs->node_name, sizeof(filtered_name));
|
||||
int rightEdge = renderBatteryIndicator(display, _task->getBattMilliVolts());
|
||||
display.setColor(DisplayDriver::LIGHT);
|
||||
if (_node_prefs && _node_prefs->tx_apc) {
|
||||
// Only show the live-power readout when APC is actually controlling power —
|
||||
// not merely when the pref is set. While repeating APC is suppressed and
|
||||
// power is pinned to the ceiling, so apcActive() is false and the name bar
|
||||
// drops the readout (matching the "--" lock in Settings).
|
||||
if (the_mesh.apcActive()) {
|
||||
char pwr_buf[8];
|
||||
snprintf(pwr_buf, sizeof(pwr_buf), "%ddB", (int)radio_driver.getTxPower());
|
||||
int pwr_w = display.getTextWidth(pwr_buf);
|
||||
|
||||
Reference in New Issue
Block a user