PowerSWRView: enable Range in CH Auto + always auto-scale bargraph - #5
Merged
Merged
Conversation
Two related fixes pushing back on a UX regression introduced by PR VU3ESV#4 (the hardware-style combined Power & SWR card): 1. Range button (and the matching keypad shortcut) was greyed out whenever the meter was in CH Auto, on the conclusion that the firmware silently ignores F3 in that state. The manufacturer's user-guide v5.4 (page 4 + page 9 "Recommended Usage") clarifies that the Range and Alarm buttons are per-channel, and in CH Auto they cycle the *auto-locked channel's* setting — F3 / F4 on the meter's front panel do work in pwr/swr + CH Auto. Confirmed against the bench LP-700 on 2026-05-16. (LP-700-Server PR VU3ESV#3 reverts the matching server-side NACK.) 2. The bargraph's full-scale tracked the meter's manual range setting (e.g. Rng 500W → bar full-scale 500W), which made a 2 W signal show as a 0.4 % sliver and was effectively unusable for low-power tests. The bar now always auto-scales to the smallest standard ≥ the highest power in the current snapshot, independent of the meter's range setting. The Range label still shows the meter's actual setting; only the bar's full-scale changes. The auto-scale ladder is `[1, 2, 5, 10, 25, 50, 100, 250, 500, 1K, 2.5K, 5K, 10K]` — 1-2-5 progression below 10 W for QRP resolution, then matches the LP-700's hardware range ladder above so the App's display steps align with the meter's physical labels. Drops the now-dead `fullScaleW(_:)` helper and the `perChannelLockNote` string that was shown under the disabled Range button. CLAUDE.md updated to replace the "firmware-ignores-F3/F4-in-CH-Auto" quirk note with the corrected per-channel explanation, and to document the always-auto-scale display choice. 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
Two related UX fixes pushing back on regressions in
PowerSWRViewthat PR #4 (the hardware-style combined Power & SWR card) introduced:Range button is enabled in CH Auto. Was greyed out whenever
autoChannel == true, on the conclusion that F3 is a firmware no-op in CH Auto. The LP-500 / LP-700 user-guide v5.4 (page 4, page 9 "Recommended Usage") clarifies that Range/Alarm are per-channel — F3 on the meter's front panel in CH Auto does cycle the auto-locked channel's setting, confirmed against the bench LP-700 on 2026-05-16. Companion server-side revert: Revert F3/F4 auto-channel NACK (misread probe) LP-700-Server#3.Bargraph always auto-scales for display, regardless of meter's range. Was tracking the meter's manual range (
Rng 500W → bar full-scale 500W), which made a 2 W signal show as a 0.4 % sliver. Now picks the smallest standard ≥ the highest power in the snapshot, so the bar fills meaningfully at any TX level. The Range label still shows the meter's actual setting; only the bar's full-scale is computed independently.The auto-scale ladder is now
[1, 2, 5, 10, 25, 50, 100, 250, 500, 1K, 2.5K, 5K, 10K]— 1-2-5 progression below 10 W for QRP resolution, matching the LP-700's hardware range labels above.What's removed
fullScaleW(_:)helper — dead with the always-auto-scale change.perChannelLockNotestring — was shown under the (formerly disabled) Range button.Notes
Auto → 1 → 2 → 3 → 4 → Auto, so the operator can still drop into a manual channel if they want to change settings the front-panel way.|| autoChgate for now — F4 hasn't been re-tested against the bench, deferred to a follow-up.Test plan
swift build+swift testcleanscripts/install-local.shrebuilt + installed🤖 Generated with Claude Code