diff --git a/frontend/src/components/FlexPanel.tsx b/frontend/src/components/FlexPanel.tsx index 9ef0618..aee0b2d 100644 --- a/frontend/src/components/FlexPanel.tsx +++ b/frontend/src/components/FlexPanel.tsx @@ -778,7 +778,17 @@ export function FlexPanel({ onCWSpeed, onReportRST }: { onCWSpeed?: (wpm: number return ; } const acc = /temp|degc|degf/i.test(`${m.unit}${m.name}`) ? '#ea580c' : /volt/i.test(m.unit || '') ? '#2563eb' : '#16a34a'; - return ; + // Drain current (ID): the PGXL reports a full-scale far too small + // for this meter (~3 A), so 1.5 A pinned the bar near half. The + // value itself is fine — only the bar's range was wrong. Give it a + // fixed 25 A scale (the PGXL's LDMOS pair tops out around 20 A), and + // only override an unusable reported range, not a sane one. + let lo = m.lo, hi = m.hi; + if (/amp/i.test(m.unit || '') || /^ID$|current/i.test(m.name || '')) { + lo = 0; + hi = m.hi >= 25 ? m.hi : 25; + } + return ; })} ); diff --git a/internal/cat/flex.go b/internal/cat/flex.go index c76d211..90eca91 100644 --- a/internal/cat/flex.go +++ b/internal/cat/flex.go @@ -711,7 +711,7 @@ func (f *Flex) handleStatus(payload string) { f.mu.Unlock() for _, id := range newIDs { mi := f.meterMeta[id] - debugLog.Printf("Flex: meter def #%d %s/%s unit=%s → sub", id, mi.src, mi.name, mi.unit) + debugLog.Printf("Flex: meter def #%d %s/%s unit=%s lo=%g hi=%g → sub", id, mi.src, mi.name, mi.unit, mi.lo, mi.hi) f.subscribeMeter(id) } }