Skip to content

PowerSWRView: enable Range in CH Auto + always auto-scale bargraph - #5

Merged
VU3ESV merged 1 commit into
VU3ESV:mainfrom
vu2cpl:fix/range-enabled-pwr-swr
May 23, 2026
Merged

PowerSWRView: enable Range in CH Auto + always auto-scale bargraph#5
VU3ESV merged 1 commit into
VU3ESV:mainfrom
vu2cpl:fix/range-enabled-pwr-swr

Conversation

@vu2cpl

@vu2cpl vu2cpl commented May 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Two related UX fixes pushing back on regressions in PowerSWRView that PR #4 (the hardware-style combined Power & SWR card) introduced:

  1. 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.

  2. 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.
  • perChannelLockNote string — was shown under the (formerly disabled) Range button.

Notes

  • Channel button still cycles 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.
  • Alarm button keeps its || autoCh gate for now — F4 hasn't been re-tested against the bench, deferred to a follow-up.

Test plan

  • swift build + swift test clean
  • scripts/install-local.sh rebuilt + installed
  • Bench LP-700 + Mac App:
    • Range button is enabled in pwr/swr + CH Auto (was disabled)
    • Bargraph fills sensibly at low TX power on a high manual meter range
    • Range label still tracks the meter's actual setting

🤖 Generated with Claude Code

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>
@VU3ESV
VU3ESV merged commit d6cab3f into VU3ESV:main May 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants