mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 17:27:32 +00:00
fix web TX spectrum position in CTUN mode
Add 'dup' field to state JSON (FDisplayDuplex). In CTUN+non-DUP TX, use vfo_a_hz as spectrum center so the TX signal renders at the VFO position instead of the display center. In CTUN+DUP TX, keep center_hz so the RX spectrum stays correctly positioned at the filter. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+3
-1
@@ -410,7 +410,9 @@ begin
|
||||
'Object.keys(msg).forEach(function(k){var pk=PEND_MAP[k];if(!pk||!isPending(pk))cur[k]=msg[k];});' +
|
||||
// Обновляем localCenter/localSpan из сервера только когда пользователь не тянет
|
||||
'if(!dragging&&Date.now()-wheelActiveTs>300){' +
|
||||
'if(msg.center_hz!=null)localCenter=msg.center_hz;' +
|
||||
// В CTUN без DUP: TX-спектр WDSP центрирован по vfo_a_hz, а не по DDC LO.
|
||||
// В CTUN с DUP: показываем RX-спектр → center_hz остаётся.
|
||||
'if(msg.center_hz!=null)localCenter=(cur.transmitting&&cur.ctun&&!cur.dup)?cur.vfo_a_hz:msg.center_hz;' +
|
||||
'if(msg.span_hz!=null)localSpan=msg.span_hz||192000;' +
|
||||
'}' +
|
||||
'if(!isPending("freq")){vfoA=cur.vfo_a_hz||vfoA;}' +
|
||||
|
||||
Reference in New Issue
Block a user