feat(applet): HLTH antenna health applet — rebased onto PR #3150 button-bar refactor#3153
Merged
Conversation
…n-bar refactor) Rebases @jensenpat's PR #3133 onto the customisable button-bar architecture introduced in PR #3150. HealthApplet.{h,cpp} are preserved verbatim from PR #3133; the integration changes are the delta that lets the new BarButton registry + favorites/drawer model own placement. Changes vs PR #3133 originally targeted at main: * Default placement moved from position 4 (between TX and PHNE, inside the new favorites zone) to after MTR in the drawer. Reasoning: HLTH is a diagnostic, not an every-tune control — putting it in favorites by default would push PHNE out of the 5-button favorites row and surprise shipping users. Operators who want HLTH in favorites can right-click any bar button → Favorites picker → drag HLTH up. * makeEntry() call uses m_drawer / m_drawerLayout (the new drawer layout from PR #3150), matching the convention every other drawer-resident applet now uses. * Bar-button registration is automatic via PR #3150's registerBarButton() inside makeEntry() — no manual btnRow1/2 routing needed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
29e7818 to
c31210e
Compare
…sion Three review fixes from PR #3153: 1. MainWindow wiring (blocker) — HealthApplet was registered in the AppletPanel drawer but never given a MeterModel. Without setMeterModel() the three signal connections in HealthApplet::setMeterModel never form, bestSnapshot() always returns invalid, and the applet renders permanently as IDLE / "RF IDLE". Adds the canonical wiring pair next to MeterApplet's: m_appletPanel->healthApplet()->setMeterModel(&m_radioModel.meterModel()); m_appletPanel->healthApplet()->setPowerScale(maxW, ampActive); // updatePowerScale lambda 2. Inspector-discoverability — convert the ~8 setStyleSheet(theme.resolve()) call sites in HealthApplet to ThemeManager::applyStyleSheet(widget, template) so the labels and pills register in the Phase 5 inspector reverse-map (PR #3144's sweep pattern). labelStyle/pillStyle helpers now return unresolved {{token}} templates; new applyLabelStyle/applyPillStyle wrappers route through applyStyleSheet. 3. Tighten the disconnect in HealthApplet::setMeterModel — replace the broad disconnect(m_model, nullptr, this, nullptr) with explicit named-signal disconnects so any unrelated connections to the same model survive. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rebased version of @jensenpat's #3133 onto PR #3150's customisable button-bar architecture. Same
HealthApplet.{h,cpp}source verbatim from #3133 (zero changes to applet code) — this PR is purely the AppletPanel integration delta that adapts to PR #3150's newBarButtonregistry + favorites/drawer model.Depends on #3150 — currently targets
fix/button-bar. Once #3150 merges to main, this PR's base will be retargeted to main and the diff will collapse to just the HLTH integration touchpoints.What changed vs #3133
Three integration touchpoints adjusted; HealthApplet itself untouched:
makeEntry()callsite routes throughm_drawer/m_drawerLayout(the new drawer layout from feat(bar): customizable button bar — favorites + push-down drawer #3150), matching every other drawer-resident applet's pattern. PR feat(bar): customizable button bar — favorites + push-down drawer #3150'sregisterBarButton()insidemakeEntry()handles bar-button registration automatically — no manualbtnRow2plumbing required.Default position moved from index 4 (between TX and PHNE) to after MTR in the drawer:
With the new 5-button favorites row, putting HLTH at index 4 would push PHNE out of favorites and surprise shipping users. Operators who want HLTH up top can drag it via the right-click Favorites picker.
CMakeLists.txt —
src/gui/HealthApplet.cppadded toGUI_SOURCES.Credit
Commit attribution stays with @jensenpat as the HealthApplet author. This PR exists only so the HLTH work doesn't have to wait on the contributor doing a manual rebase after #3150 lands — they're welcome to keep #3133 open if they'd prefer to do the rebase themselves.
Review of HLTH itself
The applet code is well-built — appreciated zero hardcoded colours (every paint and stylesheet call reads from
ThemeManager), clean paint-method separation, visibility-gated 20 Hz timer, three-tier meter source priority (amp → TGXL tuner → radio TX), and EWMA + recent-window variance detection.One small consistency note for a follow-up: HLTH uses
widget->setStyleSheet(theme.resolve(...))(~8 sites) instead oftheme.applyStyleSheet(widget, ...). That's the pattern PR #3144 swept across the rest of the codebase to make widgets inspector-discoverable. A two-line conversion would let the Phase 5 inspector find HLTH labels. Tiny follow-up — not blocking this PR.Test plan
fix/button-bar(cmake --build --target all)🤖 Generated with Claude Code