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:
2026-05-09 16:15:34 +03:00
co-authored by Claude Sonnet 4.6
parent 9ae77ddeb4
commit 22e01a6e3f
3 changed files with 11 additions and 6 deletions
+3 -1
View File
@@ -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;}' +