fix(cat): choosing a radio switches CAT on, and the log stops lying
A Flex 6700 owner's log: no connection attempt of any kind, and six
saves each answered with
cat: settings saved, link unchanged - staying connected
His settings were right — FlexRadio selected, 192.168.1.154, port 4992,
and the detector had found and named his radio back at him. What was off
was the master CAT switch, which sits above the radio dropdown.
Three things, because each of them failed him on its own.
The log line was false on both counts: a disabled CAT has the signature
"off", so every save took the unchanged branch and announced a link that
was staying connected when nothing was connected at all. It now says CAT
is switched off, which is the fact he needed and the only place it could
have reached him.
The panel says it too, where he was actually looking: a notice under the
switch while it is off, because everything below it can be perfectly
right and still connect to nothing.
And choosing a radio now ticks the switch. Picking a brand, typing an
address, running a detector and clicking the radio it found are all one
gesture — "connect to this" — and making the operator find a separate
master switch afterwards is a trap. Nothing here ever turns CAT off on
its own; they can still untick it.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
@@ -16352,9 +16352,22 @@ func (a *App) reloadCAT() {
|
||||
if s.Enabled && s.Backend == "omnirig" && a.cat != nil {
|
||||
_ = a.cat.OmniRigDo(func(o cat.OmniRigController) error { o.SetCWLower(s.OmniRigCWLower); return nil })
|
||||
}
|
||||
// Nothing about the link changed → leave it connected. See catLinkSig.
|
||||
// Nothing about the link changed → leave it as it is. See catLinkSig.
|
||||
if sig := catLinkSig(s); sig == a.catSig {
|
||||
// Which is NOT the same as staying connected.
|
||||
//
|
||||
// A disabled CAT has the signature "off", so every save while the master
|
||||
// switch is off took this branch and announced that the link was
|
||||
// unchanged and connected — when nothing was connected at all. A Flex
|
||||
// 6700 owner saved six times, with the right radio, the right address
|
||||
// and the detector naming his radio back at him, and this line told him
|
||||
// each time that all was well. It was the one line that could have said
|
||||
// otherwise.
|
||||
if !s.Enabled {
|
||||
applog.Printf("cat: settings saved, but CAT is switched OFF — nothing will connect until you tick it in Settings ▸ CAT")
|
||||
} else {
|
||||
applog.Printf("cat: settings saved, link unchanged — staying connected")
|
||||
}
|
||||
return
|
||||
} else {
|
||||
a.catSig = sig
|
||||
|
||||
+4
-2
@@ -6,13 +6,15 @@
|
||||
"After an update, OpsLog starts again. The fix that stopped Defender calling the updater a trojan removed the helper that waited for the old process to die, and nothing took over the job: the new instance was patient with the single-instance lock for twenty seconds while the old one is allowed thirty to shut down — closing a remote logbook, a CAT session, sometimes a backup. Where that ran long the new process gave up in silence, leaving no window and a leftover OpsLog in the task manager. It now waits for the previous process itself, ending the instant it does; and if it really has not gone, it says so instead of claiming OpsLog is already running.",
|
||||
"A UDP row set to multicast on an address that is not one now listens anyway. 127.0.0.1 in the group box is the common mistake — it is the address every other field in every other program wants — but a multicast group runs 224.0.0.0 to 239.255.255.255, and joining anything else failed on every interface with a Windows error naming nothing the operator had typed. The row simply did not run. It now listens on unicast, which is what such an address means, and says so in the log.",
|
||||
"The confirmation defaults added for the newest services were blank. HAMLOG.online arrived after most profiles were set up, so it had no default at all — and blank is not a status anybody chose. Every service now starts the same way: the sent side at R (waiting to go out), the received side at N. A blank left by a service that did not exist when you last saved is filled in; a status you chose yourself is untouched.",
|
||||
"OmniRig: a setting for rig files whose CW is the reverse one. OmniRig has two CW modes and nothing says which one a rig file calls plain CW — some Icom files map PM_CW_U to CW, others to CW-R — so clicking a CW spot on an IC-7610 landed the radio in CW-R, and the only way out was to edit the rig file. Settings → CAT → OmniRig now has a tick box for it, applied at once without dropping the link. (If your VFOs read the wrong way round on the same rig, the VFO override beside it is the answer: rig files disagree there too.)"
|
||||
"OmniRig: a setting for rig files whose CW is the reverse one. OmniRig has two CW modes and nothing says which one a rig file calls plain CW — some Icom files map PM_CW_U to CW, others to CW-R — so clicking a CW spot on an IC-7610 landed the radio in CW-R, and the only way out was to edit the rig file. Settings → CAT → OmniRig now has a tick box for it, applied at once without dropping the link. (If your VFOs read the wrong way round on the same rig, the VFO override beside it is the answer: rig files disagree there too.)",
|
||||
"Choosing a radio now switches CAT on. The master switch sits above the radio dropdown, and leaving it off while you pick your brand, type the address and run the detector — which finds your radio and prints its name — is a trap: a Flex 6700 owner did exactly that, saved six times, and got no link and no error. Picking a radio, or clicking one the detector found, ticks it. The panel also says so plainly while it is off, and the log line that used to announce \"link unchanged, staying connected\" when nothing was connected now says CAT is switched off."
|
||||
],
|
||||
"fr": [
|
||||
"Après une mise à jour, OpsLog redémarre. Le correctif qui a fait cesser la détection en cheval de Troie a supprimé l'assistant qui attendait la mort de l'ancien processus, et rien n'a repris ce travail : la nouvelle instance patientait vingt secondes sur le verrou d'instance unique alors que l'ancienne dispose de trente pour se fermer — elle referme un journal distant, une session CAT, parfois une sauvegarde. Quand cela durait, le nouveau processus abandonnait en silence : pas de fenêtre, et un OpsLog restant dans le gestionnaire des tâches. Il attend désormais l'ancien processus lui-même, et repart à l'instant où celui-ci s'arrête ; et s'il n'est vraiment pas parti, il le dit au lieu d'annoncer qu'OpsLog tourne déjà.",
|
||||
"Une ligne UDP réglée en multicast sur une adresse qui n'en est pas une écoute désormais quand même. 127.0.0.1 dans le champ groupe est l'erreur classique — c'est l'adresse que réclame tout autre champ de tout autre programme — mais un groupe multicast va de 224.0.0.0 à 239.255.255.255, et rejoindre autre chose échouait sur toutes les interfaces avec une erreur Windows ne nommant rien de ce que l'opérateur avait saisi. La ligne ne tournait tout simplement pas. Elle écoute maintenant en unicast, ce que veut dire une telle adresse, et le dit dans le journal.",
|
||||
"Les statuts par défaut des services les plus récents étaient vides. HAMLOG.online est arrivé après la configuration de la plupart des profils : il n'avait donc aucun défaut — et vide n'est pas un statut que quelqu'un a choisi. Chaque service démarre désormais pareil : côté envoi R (en attente de départ), côté réception N. Un vide laissé par un service qui n'existait pas lors de votre dernier enregistrement est comblé ; un statut que vous avez choisi n'est pas touché.",
|
||||
"OmniRig : un réglage pour les fichiers de rig dont la CW est l'inverse. OmniRig a deux modes CW et rien ne dit lequel un fichier appelle CW tout court — certains fichiers Icom associent PM_CW_U à CW, d'autres à CW-R — si bien qu'un clic sur un spot CW mettait un IC-7610 en CW-R, sans autre issue que de modifier le fichier de rig. Réglages → CAT → OmniRig a désormais une case pour cela, appliquée aussitôt sans couper la liaison. (Si vos VFO sont inversés sur la même radio, le sélecteur de VFO juste à côté est la réponse : les fichiers de rig divergent là aussi.)"
|
||||
"OmniRig : un réglage pour les fichiers de rig dont la CW est l'inverse. OmniRig a deux modes CW et rien ne dit lequel un fichier appelle CW tout court — certains fichiers Icom associent PM_CW_U à CW, d'autres à CW-R — si bien qu'un clic sur un spot CW mettait un IC-7610 en CW-R, sans autre issue que de modifier le fichier de rig. Réglages → CAT → OmniRig a désormais une case pour cela, appliquée aussitôt sans couper la liaison. (Si vos VFO sont inversés sur la même radio, le sélecteur de VFO juste à côté est la réponse : les fichiers de rig divergent là aussi.)",
|
||||
"Choisir une radio active désormais le CAT. L'interrupteur principal est au-dessus de la liste des radios, et le laisser éteint pendant qu'on choisit sa marque, saisit l'adresse et lance la détection — qui trouve la radio et affiche son nom — est un piège : un possesseur de Flex 6700 a fait exactement cela, enregistré six fois, sans liaison ni erreur. Choisir une radio, ou cliquer sur celle que la détection a trouvée, coche la case. Le panneau le dit aussi clairement tant qu'elle est décochée, et la ligne de journal qui annonçait « liaison inchangée, toujours connecté » alors que rien n'était connecté dit maintenant que le CAT est désactivé."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1871,13 +1871,21 @@ function SettingsModalImpl({ onClose, onSaved, initialSection, onMainPaneChanged
|
||||
// else writes the backend (loading a profile, an older settings file).
|
||||
const catBrand = brandOfBackend(catCfg.backend, (catCfg as any).kenwood_link).brand;
|
||||
const catLink = brandOfBackend(catCfg.backend, (catCfg as any).kenwood_link).link;
|
||||
// Choosing a radio TURNS CAT ON.
|
||||
//
|
||||
// The master switch sits above this dropdown, and leaving it off while the
|
||||
// operator picks their brand, types the IP and runs the detector — which found
|
||||
// their radio and printed its name — is a trap: every one of those gestures
|
||||
// means "connect to this". A Flex 6700 owner did exactly that, saved six
|
||||
// times, and got no link and no error. They can still untick it; nothing here
|
||||
// ever turns CAT off on its own.
|
||||
const applyCatBrand = (id: string) => {
|
||||
const b = CAT_BRANDS.find((x) => x.id === id);
|
||||
if (!b) return;
|
||||
// Keep the connection when the new brand offers it, otherwise take its
|
||||
// first — picking Flex from Kenwood-over-USB has to land on something.
|
||||
const link = b.links.includes(catLink) ? catLink : b.links[0];
|
||||
setCatCfg((s) => ({ ...s, backend: b.backend(link), kenwood_link: link } as any));
|
||||
setCatCfg((s) => ({ ...s, backend: b.backend(link), kenwood_link: link, enabled: true } as any));
|
||||
};
|
||||
const applyCatLink = (link: string) => {
|
||||
const b = CAT_BRANDS.find((x) => x.id === catBrand);
|
||||
@@ -3578,6 +3586,14 @@ function SettingsModalImpl({ onClose, onSaved, initialSection, onMainPaneChanged
|
||||
<Checkbox checked={catCfg.enabled} onCheckedChange={(c) => setCatCfg((s) => ({ ...s, enabled: !!c }))} />
|
||||
{t('cat.enable')}
|
||||
</label>
|
||||
{/* Said where it is happening. Everything below this line can be filled
|
||||
in perfectly — the right radio, the right address, the detector
|
||||
finding it by name — and none of it connects while this is off. */}
|
||||
{!catCfg.enabled && (
|
||||
<div className="rounded-md border border-warning-border bg-warning-muted px-3 py-2 text-xs text-warning-muted-foreground">
|
||||
{t('cat.disabledNotice')}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* BRAND, then CONNECTION.
|
||||
The backend list mixed the two: "Icom (USB)" and "Icom (network)"
|
||||
@@ -3663,7 +3679,7 @@ function SettingsModalImpl({ onClose, onSaved, initialSection, onMainPaneChanged
|
||||
onChange={(n) => setCatCfg((s) => ({ ...s, flex_port: n }))} fallback={4992} />
|
||||
</div>
|
||||
<div className="col-span-2">
|
||||
<FlexDiscover onPick={(ip, port) => setCatCfg((s) => ({ ...s, flex_host: ip, flex_port: port }))} />
|
||||
<FlexDiscover onPick={(ip, port) => setCatCfg((s) => ({ ...s, flex_host: ip, flex_port: port, enabled: true }))} />
|
||||
</div>
|
||||
{/* What OpsLog DOES with a Flex — panadapter spots, decode spots,
|
||||
the DAX switch for voice messages — moved to Settings →
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user