feat(udp): spot clicks switch the decoder's mode
Configure (message 15), mode field only, every other field sent as no-change: an FT4 spot clicked while WSJT-X sits in FT8 lands the operator ready to decode instead of staring at gibberish. Sent to every instance heard this session — one already in the right mode treats it as a no-op — and only for modes the decoder actually speaks (FT8/FT4/JT65/JT9/MSK144/ Q65/FST4); CW and SSB are none of its business. Toggle in the Connections panel, on by default.
This commit is contained in:
@@ -2,7 +2,7 @@ import React, { useCallback, useEffect, useState } from 'react';
|
||||
import { Plus, Trash2, Edit2, RefreshCcw, ArrowDownToLine, ArrowUpFromLine } from 'lucide-react';
|
||||
import {
|
||||
ListUDPIntegrations, SaveUDPIntegration, DeleteUDPIntegration, ReloadUDPIntegrations,
|
||||
GetWsjtHighlight, SetWsjtHighlight,
|
||||
GetWsjtHighlight, SetWsjtHighlight, GetWsjtFollowMode, SetWsjtFollowMode,
|
||||
} from '../../wailsjs/go/main/App';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
@@ -160,7 +160,11 @@ type Props = { onError: (msg: string) => void };
|
||||
|
||||
export function UDPIntegrationsPanel({ onError }: Props) {
|
||||
const [highlightOn, setHighlightOn] = useState(false);
|
||||
useEffect(() => { GetWsjtHighlight().then((v) => setHighlightOn(!!v)).catch(() => {}); }, []);
|
||||
const [followMode, setFollowMode] = useState(true);
|
||||
useEffect(() => {
|
||||
GetWsjtHighlight().then((v) => setHighlightOn(!!v)).catch(() => {});
|
||||
GetWsjtFollowMode().then((v) => setFollowMode(!!v)).catch(() => {});
|
||||
}, []);
|
||||
const { t } = useI18n();
|
||||
const [items, setItems] = useState<UDPConfig[]>([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
@@ -242,6 +246,14 @@ export function UDPIntegrationsPanel({ onError }: Props) {
|
||||
<span className="block text-[11px] text-muted-foreground">{t('udpp.highlightHint')}</span>
|
||||
</span>
|
||||
</label>
|
||||
<label className="flex items-start gap-2 text-sm cursor-pointer max-w-2xl">
|
||||
<Checkbox checked={followMode}
|
||||
onCheckedChange={(c) => { setFollowMode(!!c); void SetWsjtFollowMode(!!c); }} />
|
||||
<span>
|
||||
{t('udpp.followMode')}
|
||||
<span className="block text-[11px] text-muted-foreground">{t('udpp.followModeHint')}</span>
|
||||
</span>
|
||||
</label>
|
||||
<Section
|
||||
title={t('udpp.inboundTitle')}
|
||||
icon={<ArrowDownToLine className="size-4" />}
|
||||
|
||||
Reference in New Issue
Block a user