diff --git a/examples/companion_radio/MyMesh.h b/examples/companion_radio/MyMesh.h index 28b81536..3369cca2 100644 --- a/examples/companion_radio/MyMesh.h +++ b/examples/companion_radio/MyMesh.h @@ -156,11 +156,6 @@ protected: // Overhear suppression only makes sense while repeating; gated behind its own // opt-in pref (Settings > Radio > Suppress dup). bool wantsOverhearSuppress() const override { return _prefs.client_repeat && _prefs.repeat_suppress_dup; } - // Adaptive Power Control is suppressed while repeating: a repeater wants full, - // consistent TX power for relay reach, and its feedback sources (own ACKs / - // own flood echoes) don't fire on forwarded traffic anyway. applyApc() then - // pins power to the ceiling. - bool apcActive() const { return _prefs.tx_apc && !_prefs.client_repeat; } void sendFloodScoped(const TransportKey& scope, mesh::Packet* pkt, uint32_t delay_millis); void sendFloodScoped(const ContactInfo& recipient, mesh::Packet* pkt, uint32_t delay_millis=0) override; @@ -232,6 +227,11 @@ public: void saveRTCTime() { _store->saveRTCTime(); } DataStore* getDataStore() const { return _store; } void applyApc(); // (re)initialise Adaptive Power Control from prefs + // Adaptive Power Control is suppressed while repeating: a repeater wants full, + // consistent TX power for relay reach, and its feedback sources (own ACKs / + // own flood echoes) don't fire on forwarded traffic anyway. applyApc() then + // pins power to the ceiling. + bool apcActive() const { return _prefs.tx_apc && !_prefs.client_repeat; } // True when the optional repeater radio profile is a valid LoRa config. bool repeaterProfileValid() const { diff --git a/examples/companion_radio/ui-new/UITask.cpp b/examples/companion_radio/ui-new/UITask.cpp index cf1d285d..6804efe9 100644 --- a/examples/companion_radio/ui-new/UITask.cpp +++ b/examples/companion_radio/ui-new/UITask.cpp @@ -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);