Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8113557015 | ||
|
|
3def789742 | ||
|
|
92ea98bcfa | ||
|
|
15649a4e92 | ||
|
|
a6842382b2 | ||
|
|
5bf7eb45d7 | ||
|
|
09f3ddaacb | ||
|
|
ca8617c891 |
@@ -57,6 +57,7 @@ import (
|
|||||||
"hamlog/internal/relaydev"
|
"hamlog/internal/relaydev"
|
||||||
"hamlog/internal/rigctld"
|
"hamlog/internal/rigctld"
|
||||||
"hamlog/internal/rotator/dcu1"
|
"hamlog/internal/rotator/dcu1"
|
||||||
|
"hamlog/internal/rotator/spid"
|
||||||
"hamlog/internal/rotator/gs232"
|
"hamlog/internal/rotator/gs232"
|
||||||
"hamlog/internal/rotator/pst"
|
"hamlog/internal/rotator/pst"
|
||||||
"hamlog/internal/rotgenius"
|
"hamlog/internal/rotgenius"
|
||||||
@@ -14186,6 +14187,10 @@ type RotatorDevice struct {
|
|||||||
Transport string `json:"transport"` // ARCO: "tcp" (LAN) | "serial" (USB COM)
|
Transport string `json:"transport"` // ARCO: "tcp" (LAN) | "serial" (USB COM)
|
||||||
ComPort string `json:"com_port"` // GS-232 serial transport
|
ComPort string `json:"com_port"` // GS-232 serial transport
|
||||||
Baud int `json:"baud"` // GS-232 serial baud (an ERC needs it; an ARCO ignores it)
|
Baud int `json:"baud"` // GS-232 serial baud (an ERC needs it; an ARCO ignores it)
|
||||||
|
// SpidModel picks the SPID dialect: "rot2prog" (RAS/BIG-RAS/MD-01/MD-02,
|
||||||
|
// azimuth + elevation) or "rot1prog" (the older azimuth-only controller).
|
||||||
|
// They differ in reply length and baud rate, so guessing is not an option.
|
||||||
|
SpidModel string `json:"spid_model,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// logicalRotor is one addressable rotor. Flattening the device list expands a
|
// logicalRotor is one addressable rotor. Flattening the device list expands a
|
||||||
@@ -14198,7 +14203,7 @@ type logicalRotor struct {
|
|||||||
|
|
||||||
// normRotorType clamps a rotor type to a known backend.
|
// normRotorType clamps a rotor type to a known backend.
|
||||||
func normRotorType(t string) string {
|
func normRotorType(t string) string {
|
||||||
if t == "rotgenius" || t == "arco" || t == "dcu1" {
|
if t == "rotgenius" || t == "arco" || t == "dcu1" || t == "spid" {
|
||||||
return t
|
return t
|
||||||
}
|
}
|
||||||
return "pst"
|
return "pst"
|
||||||
@@ -14224,6 +14229,7 @@ func deviceLink(d RotatorDevice, sub int) rotorLink {
|
|||||||
l := rotorLink{
|
l := rotorLink{
|
||||||
Type: normRotorType(d.Type), Host: d.Host, Port: d.Port,
|
Type: normRotorType(d.Type), Host: d.Host, Port: d.Port,
|
||||||
Transport: d.Transport, ComPort: d.ComPort, Baud: d.Baud, HasElevation: d.HasElevation,
|
Transport: d.Transport, ComPort: d.ComPort, Baud: d.Baud, HasElevation: d.HasElevation,
|
||||||
|
SpidModel: d.SpidModel,
|
||||||
}
|
}
|
||||||
if l.Host == "" {
|
if l.Host == "" {
|
||||||
l.Host = "127.0.0.1"
|
l.Host = "127.0.0.1"
|
||||||
@@ -14232,8 +14238,13 @@ func deviceLink(d RotatorDevice, sub int) rotorLink {
|
|||||||
l.Port = rotatorDefaultPort(l.Type)
|
l.Port = rotatorDefaultPort(l.Type)
|
||||||
}
|
}
|
||||||
if l.Baud <= 0 {
|
if l.Baud <= 0 {
|
||||||
|
// A SPID runs at 600 or 1200 baud depending on the dialect; 0 lets its
|
||||||
|
// driver pick, and forcing 9600 here would have made every controller
|
||||||
|
// mute for a reason nobody would guess.
|
||||||
|
if l.Type != "spid" {
|
||||||
l.Baud = 9600
|
l.Baud = 9600
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if l.Transport != "serial" {
|
if l.Transport != "serial" {
|
||||||
l.Transport = "tcp"
|
l.Transport = "tcp"
|
||||||
}
|
}
|
||||||
@@ -14368,6 +14379,7 @@ type rotorLink struct {
|
|||||||
ComPort string
|
ComPort string
|
||||||
Baud int
|
Baud int
|
||||||
HasElevation bool
|
HasElevation bool
|
||||||
|
SpidModel string // SPID: "rot2prog" (default) | "rot1prog"
|
||||||
}
|
}
|
||||||
|
|
||||||
// activeRotorIndex returns the compass-selected rotor index, clamped to the
|
// activeRotorIndex returns the compass-selected rotor index, clamped to the
|
||||||
@@ -14415,6 +14427,22 @@ func dcu1Client(l rotorLink) *dcu1.Client {
|
|||||||
return dcu1.New(l.Host, l.Port)
|
return dcu1.New(l.Host, l.Port)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// spidClient builds the SPID (AlfaSpid) client for a rotor.
|
||||||
|
//
|
||||||
|
// Serial only, and that is the point: these controllers have a COM port and
|
||||||
|
// nothing else. The request this answers was to drive them WITHOUT PstRotator
|
||||||
|
// sitting in between, so there is no network transport to offer.
|
||||||
|
//
|
||||||
|
// Baud 0 lets the driver take the dialect's documented default — 600 baud for
|
||||||
|
// Rot2Prog, 1200 for Rot1Prog. Those numbers look wrong and are not.
|
||||||
|
func spidClient(l rotorLink) *spid.Client {
|
||||||
|
m := spid.Rot2Prog
|
||||||
|
if l.SpidModel == string(spid.Rot1Prog) {
|
||||||
|
m = spid.Rot1Prog
|
||||||
|
}
|
||||||
|
return spid.New(l.ComPort, l.Baud, m)
|
||||||
|
}
|
||||||
|
|
||||||
// RotatorHeading is the live antenna heading for the status bar and compass.
|
// RotatorHeading is the live antenna heading for the status bar and compass.
|
||||||
type RotatorHeading struct {
|
type RotatorHeading struct {
|
||||||
Enabled bool `json:"enabled"`
|
Enabled bool `json:"enabled"`
|
||||||
@@ -14481,6 +14509,16 @@ func (a *App) GetRotatorHeading() RotatorHeading {
|
|||||||
base.Azimuth = az
|
base.Azimuth = az
|
||||||
base.Raw = raw
|
base.Raw = raw
|
||||||
return base
|
return base
|
||||||
|
case "spid":
|
||||||
|
az, _, herr := spidClient(link).Heading()
|
||||||
|
if herr != nil {
|
||||||
|
base.Raw = herr.Error()
|
||||||
|
return base
|
||||||
|
}
|
||||||
|
base.OK = true
|
||||||
|
base.Azimuth = az
|
||||||
|
base.Raw = fmt.Sprintf("%d°", az)
|
||||||
|
return base
|
||||||
case "dcu1":
|
case "dcu1":
|
||||||
az, raw, herr := dcu1Client(link).Heading()
|
az, raw, herr := dcu1Client(link).Heading()
|
||||||
if herr != nil {
|
if herr != nil {
|
||||||
@@ -14531,6 +14569,8 @@ func (a *App) RotatorGoToPath(az int, el int, path string) error {
|
|||||||
return rotgenius.New(link.Host, link.Port).GoTo(link.Num, az)
|
return rotgenius.New(link.Host, link.Port).GoTo(link.Num, az)
|
||||||
case "arco":
|
case "arco":
|
||||||
return arcoClient(link).GoTo(az)
|
return arcoClient(link).GoTo(az)
|
||||||
|
case "spid":
|
||||||
|
return spidClient(link).GoTo(az, el)
|
||||||
case "dcu1":
|
case "dcu1":
|
||||||
return dcu1Client(link).GoTo(az)
|
return dcu1Client(link).GoTo(az)
|
||||||
default:
|
default:
|
||||||
@@ -14550,6 +14590,8 @@ func (a *App) RotatorStop() error {
|
|||||||
return rotgenius.New(link.Host, link.Port).Stop()
|
return rotgenius.New(link.Host, link.Port).Stop()
|
||||||
case "arco":
|
case "arco":
|
||||||
return arcoClient(link).Stop()
|
return arcoClient(link).Stop()
|
||||||
|
case "spid":
|
||||||
|
return spidClient(link).Stop()
|
||||||
case "dcu1":
|
case "dcu1":
|
||||||
return dcu1Client(link).Stop()
|
return dcu1Client(link).Stop()
|
||||||
default:
|
default:
|
||||||
@@ -14570,6 +14612,8 @@ func (a *App) RotatorPark() error {
|
|||||||
return fmt.Errorf("park is a PstRotator feature; not available on the Rotator Genius")
|
return fmt.Errorf("park is a PstRotator feature; not available on the Rotator Genius")
|
||||||
case "arco":
|
case "arco":
|
||||||
return fmt.Errorf("park is a PstRotator feature; not available over the ARCO GS-232 link")
|
return fmt.Errorf("park is a PstRotator feature; not available over the ARCO GS-232 link")
|
||||||
|
case "spid":
|
||||||
|
return fmt.Errorf("park is a PstRotator feature; a SPID controller has no park command")
|
||||||
case "dcu1":
|
case "dcu1":
|
||||||
return fmt.Errorf("park is a PstRotator feature; not available over the DCU-1 link")
|
return fmt.Errorf("park is a PstRotator feature; not available over the DCU-1 link")
|
||||||
default:
|
default:
|
||||||
@@ -14610,6 +14654,15 @@ func testRotorLink(l rotorLink) error {
|
|||||||
// GS-232 — without moving the antenna.
|
// GS-232 — without moving the antenna.
|
||||||
_, _, err := arcoClient(l).Heading()
|
_, _, err := arcoClient(l).Heading()
|
||||||
return err
|
return err
|
||||||
|
case "spid":
|
||||||
|
if strings.TrimSpace(l.ComPort) == "" {
|
||||||
|
return fmt.Errorf("select the SPID controller's COM port first")
|
||||||
|
}
|
||||||
|
// A status read proves the port, the baud rate and the dialect at once,
|
||||||
|
// without moving anything — and a wrong dialect shows up here as a reply
|
||||||
|
// of the wrong length rather than as an antenna that turns oddly later.
|
||||||
|
_, _, err := spidClient(l).Heading()
|
||||||
|
return err
|
||||||
case "dcu1":
|
case "dcu1":
|
||||||
if l.Transport == "serial" && strings.TrimSpace(l.ComPort) == "" {
|
if l.Transport == "serial" && strings.TrimSpace(l.ComPort) == "" {
|
||||||
return fmt.Errorf("select the DCU-1 controller's COM port first")
|
return fmt.Errorf("select the DCU-1 controller's COM port first")
|
||||||
|
|||||||
@@ -1,4 +1,26 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"version": "0.25.4",
|
||||||
|
"date": "",
|
||||||
|
"en": [
|
||||||
|
"WinKeyer: the opening probe goes out as one write, matching a capture of a client that talks to the same K3NG keyer, and the handshake bytes are always logged so a keyer that stays silent can be diagnosed."
|
||||||
|
],
|
||||||
|
"fr": [
|
||||||
|
"WinKeyer : la sonde d’ouverture part en un seul envoi, calquée sur la capture d’un client qui dialogue avec le même manipulateur K3NG, et les octets de la poignée de main sont toujours journalisés pour diagnostiquer un manipulateur muet."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "0.25.3",
|
||||||
|
"date": "",
|
||||||
|
"en": [
|
||||||
|
"Confirmations: a LoTW contact marked V (verified) counted for the awards but nowhere else — the band/mode matrix, the slot statistics, the row colours and the QSL Info table all read it as unconfirmed, the last one showing it as “No”. It now reads as Verified everywhere.",
|
||||||
|
"Rotators: SPID / AlfaSpid controllers are driven natively over their own COM port — Rot2Prog and Rot1Prog — so PstRotator is no longer needed in between. Two towers means two rotors, as before."
|
||||||
|
],
|
||||||
|
"fr": [
|
||||||
|
"Confirmations : un contact LoTW marqué V (vérifié) comptait pour les diplômes et nulle part ailleurs — la matrice bande/mode, les statistiques de créneaux, la coloration des lignes et le tableau Infos QSL le lisaient comme non confirmé, le dernier l’affichant même « Non ». Il s’affiche désormais « Vérifié » partout.",
|
||||||
|
"Rotors : les contrôleurs SPID / AlfaSpid sont pilotés nativement par leur propre port COM — Rot2Prog et Rot1Prog — sans passer par PstRotator. Deux pylônes restent deux rotors, comme avant."
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "0.25.2",
|
"version": "0.25.2",
|
||||||
"date": "",
|
"date": "",
|
||||||
|
|||||||
+2
-2
@@ -109,9 +109,9 @@ func probeWB(conn *sql.DB, call string, dxcc int) {
|
|||||||
SELECT band, mode,
|
SELECT band, mode,
|
||||||
MAX(CASE WHEN callsign = ? THEN 1 ELSE 0 END),
|
MAX(CASE WHEN callsign = ? THEN 1 ELSE 0 END),
|
||||||
MAX(CASE WHEN callsign = ?
|
MAX(CASE WHEN callsign = ?
|
||||||
AND (lotw_rcvd = 'Y' OR qsl_rcvd = 'Y' OR eqsl_rcvd = 'Y')
|
AND (lotw_rcvd IN ('Y','V') OR qsl_rcvd IN ('Y','V') OR eqsl_rcvd IN ('Y','V'))
|
||||||
THEN 1 ELSE 0 END),
|
THEN 1 ELSE 0 END),
|
||||||
MAX(CASE WHEN lotw_rcvd = 'Y' OR qsl_rcvd = 'Y' OR eqsl_rcvd = 'Y'
|
MAX(CASE WHEN lotw_rcvd IN ('Y','V') OR qsl_rcvd IN ('Y','V') OR eqsl_rcvd IN ('Y','V')
|
||||||
THEN 1 ELSE 0 END)
|
THEN 1 ELSE 0 END)
|
||||||
FROM qso WHERE dxcc = ?
|
FROM qso WHERE dxcc = ?
|
||||||
GROUP BY band, mode
|
GROUP BY band, mode
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { Button } from '@/components/ui/button';
|
|||||||
import { Checkbox } from '@/components/ui/checkbox';
|
import { Checkbox } from '@/components/ui/checkbox';
|
||||||
import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from '@/components/ui/select';
|
import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from '@/components/ui/select';
|
||||||
import { cn } from '@/lib/utils';
|
import { cn } from '@/lib/utils';
|
||||||
|
import { isQSLConfirmed } from '@/lib/qsl';
|
||||||
import { AwardEditor } from '@/components/AwardEditor';
|
import { AwardEditor } from '@/components/AwardEditor';
|
||||||
import { useI18n } from '@/lib/i18n';
|
import { useI18n } from '@/lib/i18n';
|
||||||
import { writeUiPref } from '@/lib/uiPref';
|
import { writeUiPref } from '@/lib/uiPref';
|
||||||
@@ -818,7 +819,7 @@ function CellQSOModal({ code, cell, modeClass, onClose }: { code: string; cell:
|
|||||||
<td className="py-1 pr-2 font-mono font-semibold">{q.callsign}</td>
|
<td className="py-1 pr-2 font-mono font-semibold">{q.callsign}</td>
|
||||||
<td className="py-1 pr-2">{q.band}</td>
|
<td className="py-1 pr-2">{q.band}</td>
|
||||||
<td className="py-1 pr-2">{q.mode}</td>
|
<td className="py-1 pr-2">{q.mode}</td>
|
||||||
<td className="py-1 pr-3 text-muted-foreground">{[q.lotw_rcvd === 'Y' && 'LoTW', q.qsl_rcvd === 'Y' && 'QSL', q.eqsl_rcvd === 'Y' && 'eQSL'].filter(Boolean).join(', ')}</td>
|
<td className="py-1 pr-3 text-muted-foreground">{[isQSLConfirmed(q.lotw_rcvd) && 'LoTW', isQSLConfirmed(q.qsl_rcvd) && 'QSL', isQSLConfirmed(q.eqsl_rcvd) && 'eQSL'].filter(Boolean).join(', ')}</td>
|
||||||
</tr>
|
</tr>
|
||||||
))}
|
))}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { Star, Radio, Sunrise, Sunset, X, Loader2 } from 'lucide-react';
|
|||||||
import { Badge } from '@/components/ui/badge';
|
import { Badge } from '@/components/ui/badge';
|
||||||
import { cn } from '@/lib/utils';
|
import { cn } from '@/lib/utils';
|
||||||
import { sunTimes } from '@/lib/sun';
|
import { sunTimes } from '@/lib/sun';
|
||||||
|
import { isQSLConfirmed } from '@/lib/qsl';
|
||||||
import { BandSlotQSOs } from '../../wailsjs/go/main/App';
|
import { BandSlotQSOs } from '../../wailsjs/go/main/App';
|
||||||
import type { WorkedBeforeView } from '@/types';
|
import type { WorkedBeforeView } from '@/types';
|
||||||
|
|
||||||
@@ -426,7 +427,7 @@ function SlotQSOModal({ call, dxcc, entity, band, cls, onClose, onEdit }: {
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{rows.map((q, i) => {
|
{rows.map((q, i) => {
|
||||||
const cfm = q.lotw_rcvd === 'Y' || q.eqsl_rcvd === 'Y' || q.qsl_rcvd === 'Y';
|
const cfm = isQSLConfirmed(q.lotw_rcvd) || isQSLConfirmed(q.eqsl_rcvd) || isQSLConfirmed(q.qsl_rcvd);
|
||||||
const mine = q.callsign === call;
|
const mine = q.callsign === call;
|
||||||
return (
|
return (
|
||||||
<tr key={q.id ?? i} className="border-t border-border/40 even:bg-muted/[0.06] hover:bg-primary/[0.06] transition-colors">
|
<tr key={q.id ?? i} className="border-t border-border/40 even:bg-muted/[0.06] hover:bg-primary/[0.06] transition-colors">
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { Star } from 'lucide-react';
|
import { Star } from 'lucide-react';
|
||||||
import { Badge } from '@/components/ui/badge';
|
import { Badge } from '@/components/ui/badge';
|
||||||
import { useI18n } from '@/lib/i18n';
|
import { useI18n } from '@/lib/i18n';
|
||||||
|
import { isQSLConfirmed } from '@/lib/qsl';
|
||||||
import type { WorkedBeforeView } from '@/types';
|
import type { WorkedBeforeView } from '@/types';
|
||||||
|
|
||||||
type WorkedBefore = WorkedBeforeView;
|
type WorkedBefore = WorkedBeforeView;
|
||||||
@@ -97,10 +98,10 @@ export function CallHistoryPanel({ wb, busy, currentCall }: Props) {
|
|||||||
<td className="px-2 py-1 font-mono border-b border-border/40 whitespace-nowrap">{e.rst_sent ?? ''}</td>
|
<td className="px-2 py-1 font-mono border-b border-border/40 whitespace-nowrap">{e.rst_sent ?? ''}</td>
|
||||||
<td className="px-2 py-1 font-mono border-b border-border/40 whitespace-nowrap">{e.rst_rcvd ?? ''}</td>
|
<td className="px-2 py-1 font-mono border-b border-border/40 whitespace-nowrap">{e.rst_rcvd ?? ''}</td>
|
||||||
<td className="px-2 py-1 border-b border-border/40 whitespace-nowrap text-muted-foreground">
|
<td className="px-2 py-1 border-b border-border/40 whitespace-nowrap text-muted-foreground">
|
||||||
{e.lotw_rcvd === 'Y' && (
|
{isQSLConfirmed(e.lotw_rcvd) && (
|
||||||
<span className="inline-block w-[14px] h-[14px] rounded text-center leading-[14px] text-[9px] font-bold text-info-foreground bg-info mr-0.5" title={t('chp.lotwRcvd')}>L</span>
|
<span className="inline-block w-[14px] h-[14px] rounded text-center leading-[14px] text-[9px] font-bold text-info-foreground bg-info mr-0.5" title={t('chp.lotwRcvd')}>L</span>
|
||||||
)}
|
)}
|
||||||
{e.qsl_rcvd === 'Y' && (
|
{isQSLConfirmed(e.qsl_rcvd) && (
|
||||||
<span className="inline-block w-[14px] h-[14px] rounded text-center leading-[14px] text-[9px] font-bold text-success-foreground bg-success mr-0.5" title={t('chp.bureauRcvd')}>B</span>
|
<span className="inline-block w-[14px] h-[14px] rounded text-center leading-[14px] text-[9px] font-bold text-success-foreground bg-success mr-0.5" title={t('chp.bureauRcvd')}>B</span>
|
||||||
)}
|
)}
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -41,9 +41,14 @@ function pfxOf(call: string): string {
|
|||||||
const BANDS = ['2190m','630m','160m','80m','60m','40m','30m','20m','17m','15m','12m','10m','6m','4m','2m','1.25m','70cm','33cm','23cm','13cm','9cm','6cm','3cm','1.25cm','6mm','4mm','2.5mm','2mm','1mm'];
|
const BANDS = ['2190m','630m','160m','80m','60m','40m','30m','20m','17m','15m','12m','10m','6m','4m','2m','1.25m','70cm','33cm','23cm','13cm','9cm','6cm','3cm','1.25cm','6mm','4mm','2.5mm','2mm','1mm'];
|
||||||
const MODES = ['SSB','CW','FT8','FT4','RTTY','PSK31','AM','FM','DIGITALVOICE','MFSK','OLIVIA','JS8','JT65','JT9'];
|
const MODES = ['SSB','CW','FT8','FT4','RTTY','PSK31','AM','FM','DIGITALVOICE','MFSK','OLIVIA','JS8','JT65','JT9'];
|
||||||
// label holds an i18n key (resolved with t() at render time).
|
// label holds an i18n key (resolved with t() at render time).
|
||||||
|
// V is in the list because the log HOLDS it: a LoTW download writes "verified"
|
||||||
|
// rather than "yes". A dropdown without it renders a verified contact as blank,
|
||||||
|
// which reads as "nothing recorded" — and the operator's next click would replace
|
||||||
|
// the strongest confirmation they have with whatever they picked instead.
|
||||||
const QSL_STATUSES = [
|
const QSL_STATUSES = [
|
||||||
{ value: '_', label: 'qedit.qslDash' },
|
{ value: '_', label: 'qedit.qslDash' },
|
||||||
{ value: 'Y', label: 'qedit.qslYes' },
|
{ value: 'Y', label: 'qedit.qslYes' },
|
||||||
|
{ value: 'V', label: 'qedit.qslVerified' },
|
||||||
{ value: 'N', label: 'qedit.qslNo' },
|
{ value: 'N', label: 'qedit.qslNo' },
|
||||||
{ value: 'R', label: 'qedit.qslRequested' },
|
{ value: 'R', label: 'qedit.qslRequested' },
|
||||||
{ value: 'I', label: 'qedit.qslIgnore' },
|
{ value: 'I', label: 'qedit.qslIgnore' },
|
||||||
@@ -99,9 +104,14 @@ function StatusCell({ value }: { value?: string }) {
|
|||||||
// every row; painting that orange (as it used to be, in the
|
// every row; painting that orange (as it used to be, in the
|
||||||
// same orange as Requested) made the table shout about a
|
// same orange as Requested) made the table shout about a
|
||||||
// non-problem and told you nothing apart.
|
// non-problem and told you nothing apart.
|
||||||
|
// Verified green — ADIF's V: confirmed AND validated by the awarding body.
|
||||||
|
// It is what a LoTW download writes, and this table used
|
||||||
|
// to fall through to "No" for it — reporting a verified
|
||||||
|
// contact as unconfirmed, in the one place an operator
|
||||||
|
// goes to check.
|
||||||
// Ignore dashed — deliberately excluded, on purpose.
|
// Ignore dashed — deliberately excluded, on purpose.
|
||||||
const label = v === 'Y' ? t('qedit.qslYes') : v === 'R' ? t('qedit.qslRequested') : v === 'I' ? t('qedit.qslIgnore') : v === 'M' ? t('qedit.statusModified') : t('qedit.qslNo');
|
const label = v === 'Y' ? t('qedit.qslYes') : v === 'V' ? t('qedit.qslVerified') : v === 'R' ? t('qedit.qslRequested') : v === 'I' ? t('qedit.qslIgnore') : v === 'M' ? t('qedit.statusModified') : t('qedit.qslNo');
|
||||||
const cls = v === 'Y' ? 'bg-success text-success-foreground border border-success'
|
const cls = v === 'Y' || v === 'V' ? 'bg-success text-success-foreground border border-success'
|
||||||
: v === 'R' ? 'bg-info-muted text-info-muted-foreground border border-info-border'
|
: v === 'R' ? 'bg-info-muted text-info-muted-foreground border border-info-border'
|
||||||
: v === 'M' ? 'bg-warning text-warning-foreground border border-warning'
|
: v === 'M' ? 'bg-warning text-warning-foreground border border-warning'
|
||||||
: v === 'I' ? 'bg-muted text-muted-foreground border border-dashed border-border italic'
|
: v === 'I' ? 'bg-muted text-muted-foreground border border-dashed border-border italic'
|
||||||
|
|||||||
@@ -3674,7 +3674,10 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan
|
|||||||
const isRG = dev.type === 'rotgenius';
|
const isRG = dev.type === 'rotgenius';
|
||||||
const isARCO = dev.type === 'arco';
|
const isARCO = dev.type === 'arco';
|
||||||
const isDCU1 = dev.type === 'dcu1';
|
const isDCU1 = dev.type === 'dcu1';
|
||||||
const isSerialCap = isARCO || isDCU1; // COM-port or serial-over-IP controllers
|
// A SPID has a COM port and nothing else — no network transport to
|
||||||
|
// offer, which is the whole point of driving it without PstRotator.
|
||||||
|
const isSPID = dev.type === 'spid';
|
||||||
|
const isSerialCap = isARCO || isDCU1 || isSPID; // COM-port or serial-over-IP controllers
|
||||||
const transport = dev.transport ?? 'tcp';
|
const transport = dev.transport ?? 'tcp';
|
||||||
return (
|
return (
|
||||||
<div key={dev.id || i} className="rounded-xl border border-border bg-card/40 p-3 space-y-3">
|
<div key={dev.id || i} className="rounded-xl border border-border bg-card/40 p-3 space-y-3">
|
||||||
@@ -3693,13 +3696,14 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan
|
|||||||
{/* Each backend gets its default port: Rotator Genius 9006, ARCO 4001
|
{/* Each backend gets its default port: Rotator Genius 9006, ARCO 4001
|
||||||
(placeholder — must match the ARCO's LAN menu), PstRotator 12000. */}
|
(placeholder — must match the ARCO's LAN menu), PstRotator 12000. */}
|
||||||
<Select value={dev.type ?? 'pst'}
|
<Select value={dev.type ?? 'pst'}
|
||||||
onValueChange={(v) => patch(i, { type: v as any, port: v === 'rotgenius' ? 9006 : (v === 'arco' || v === 'dcu1') ? 4001 : 12000, ...(v === 'dcu1' ? { transport: 'serial' } : {}) })}>
|
onValueChange={(v) => patch(i, { type: v as any, port: v === 'rotgenius' ? 9006 : (v === 'arco' || v === 'dcu1') ? 4001 : 12000, ...(v === 'dcu1' || v === 'spid' ? { transport: 'serial' } : {}), ...(v === 'spid' ? { baud: 600, spid_model: 'rot2prog' } : {}) })}>
|
||||||
<SelectTrigger className="h-9"><SelectValue /></SelectTrigger>
|
<SelectTrigger className="h-9"><SelectValue /></SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectItem value="pst">PstRotator (UDP)</SelectItem>
|
<SelectItem value="pst">PstRotator (UDP)</SelectItem>
|
||||||
<SelectItem value="rotgenius">Rotator Genius (4O3A, native)</SelectItem>
|
<SelectItem value="rotgenius">Rotator Genius (4O3A, native)</SelectItem>
|
||||||
<SelectItem value="arco">GS-232A controller (microHAM ARCO, ERC…)</SelectItem>
|
<SelectItem value="arco">GS-232A controller (microHAM ARCO, ERC…)</SelectItem>
|
||||||
<SelectItem value="dcu1">Hy-Gain DCU-1 (RotorCard DXA, Rotor-EZ, Green Heron)</SelectItem>
|
<SelectItem value="dcu1">Hy-Gain DCU-1 (RotorCard DXA, Rotor-EZ, Green Heron)</SelectItem>
|
||||||
|
<SelectItem value="spid">SPID / AlfaSpid (RAS, BIG-RAS, MD-01, MD-02)</SelectItem>
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
</Select>
|
</Select>
|
||||||
</div>
|
</div>
|
||||||
@@ -3716,8 +3720,24 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan
|
|||||||
</Select>
|
</Select>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
{/* SPID: pick the dialect. They differ in reply length AND baud
|
||||||
|
rate, so this cannot be detected — a wrong choice is a
|
||||||
|
controller that never answers. */}
|
||||||
|
{isSPID && (
|
||||||
|
<div className="space-y-1">
|
||||||
|
<Label>{t('rot.spidModel')}</Label>
|
||||||
|
<Select value={dev.spid_model || 'rot2prog'}
|
||||||
|
onValueChange={(v) => patch(i, { spid_model: v as any, baud: v === 'rot1prog' ? 1200 : 600 })}>
|
||||||
|
<SelectTrigger className="h-9"><SelectValue /></SelectTrigger>
|
||||||
|
<SelectContent>
|
||||||
|
<SelectItem value="rot2prog">Rot2Prog (RAS, BIG-RAS/HR, MD-01, MD-02)</SelectItem>
|
||||||
|
<SelectItem value="rot1prog">Rot1Prog (azimuth only)</SelectItem>
|
||||||
|
</SelectContent>
|
||||||
|
</Select>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
{/* ARCO and DCU-1 controllers reach over the LAN (TCP) or a serial COM. */}
|
{/* ARCO and DCU-1 controllers reach over the LAN (TCP) or a serial COM. */}
|
||||||
{isSerialCap && (
|
{isSerialCap && !isSPID && (
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
<Label>Connection</Label>
|
<Label>Connection</Label>
|
||||||
<Select value={transport} onValueChange={(v) => patch(i, { transport: v as any })}>
|
<Select value={transport} onValueChange={(v) => patch(i, { transport: v as any })}>
|
||||||
@@ -3751,10 +3771,13 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan
|
|||||||
<Button size="sm" variant="outline" className="h-9" onClick={() => ListSerialPorts().then((p) => setWkPorts((p ?? []) as string[])).catch(() => {})}>
|
<Button size="sm" variant="outline" className="h-9" onClick={() => ListSerialPorts().then((p) => setWkPorts((p ?? []) as string[])).catch(() => {})}>
|
||||||
<ArrowDown className="size-3.5 rotate-90" />
|
<ArrowDown className="size-3.5 rotate-90" />
|
||||||
</Button>
|
</Button>
|
||||||
<Select value={String(dev.baud || 9600)} onValueChange={(v) => patch(i, { baud: Number(v) })}>
|
{/* A SPID runs at 600 or 1200 baud — not a typo, a pulse
|
||||||
|
controller has nothing to say quickly. Offering only the
|
||||||
|
usual rates would have left it permanently mute. */}
|
||||||
|
<Select value={String(dev.baud || (isSPID ? 600 : 9600))} onValueChange={(v) => patch(i, { baud: Number(v) })}>
|
||||||
<SelectTrigger className="h-9 w-28"><SelectValue /></SelectTrigger>
|
<SelectTrigger className="h-9 w-28"><SelectValue /></SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
{[4800, 9600, 19200, 38400, 57600].map((b) => (
|
{(isSPID ? [600, 1200, 2400, 4800, 9600] : [4800, 9600, 19200, 38400, 57600]).map((b) => (
|
||||||
<SelectItem key={b} value={String(b)}>{b} baud</SelectItem>
|
<SelectItem key={b} value={String(b)}>{b} baud</SelectItem>
|
||||||
))}
|
))}
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
@@ -3784,6 +3807,7 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan
|
|||||||
{isRG && <p className="text-xs text-muted-foreground">{t('rot.rgHint')}</p>}
|
{isRG && <p className="text-xs text-muted-foreground">{t('rot.rgHint')}</p>}
|
||||||
{isARCO && <p className="text-xs text-muted-foreground">{t('rot.arcoHint')}</p>}
|
{isARCO && <p className="text-xs text-muted-foreground">{t('rot.arcoHint')}</p>}
|
||||||
{isDCU1 && <p className="text-xs text-muted-foreground">{t('rot.dcu1Hint')}</p>}
|
{isDCU1 && <p className="text-xs text-muted-foreground">{t('rot.dcu1Hint')}</p>}
|
||||||
|
{isSPID && <p className="text-xs text-muted-foreground">{t('rot.spidHint')}</p>}
|
||||||
{/* Which antenna this rotor carries — only relevant with >1 rotor. */}
|
{/* Which antenna this rotor carries — only relevant with >1 rotor. */}
|
||||||
{multi && (
|
{multi && (
|
||||||
<div className="space-y-1 max-w-xs">
|
<div className="space-y-1 max-w-xs">
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,17 @@
|
|||||||
|
// One answer to "is this QSL received".
|
||||||
|
//
|
||||||
|
// ADIF's QSL_Rcvd enumeration has BOTH Y and V: Y is "received", V is
|
||||||
|
// "verified" — and V is what a LoTW download writes for a confirmation the ARRL
|
||||||
|
// has validated. Testing for 'Y' alone therefore misses exactly the
|
||||||
|
// confirmations an operator cares most about.
|
||||||
|
//
|
||||||
|
// It showed on screen: the Awards panel had Morocco validated on five bands
|
||||||
|
// while the band/mode matrix beside it showed the entity as merely worked. The
|
||||||
|
// award engine accepted Y or V; every other test in the app accepted Y.
|
||||||
|
//
|
||||||
|
// The Go side has the same rule twice over — award.isYes and qso.ConfirmedValues
|
||||||
|
// — and all three have to agree. If you add a value here, add it there.
|
||||||
|
export function isQSLConfirmed(v: unknown): boolean {
|
||||||
|
const s = String(v ?? '').trim().toUpperCase();
|
||||||
|
return s === 'Y' || s === 'V';
|
||||||
|
}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { isQSLConfirmed } from '@/lib/qsl';
|
||||||
// Row colouring for the log grid, by QSL status.
|
// Row colouring for the log grid, by QSL status.
|
||||||
//
|
//
|
||||||
// Four categories, each scoped to the channels the operator cares about —
|
// Four categories, each scoped to the channels the operator cares about —
|
||||||
@@ -32,7 +33,9 @@ const FIELDS: Record<string, { sent: string; rcvd: string }> = {
|
|||||||
// ADIF QSL fields are single letters. Y is the only one that means "yes";
|
// ADIF QSL fields are single letters. Y is the only one that means "yes";
|
||||||
// R (requested) and Q (queued) mean it has not gone out yet — a different state,
|
// R (requested) and Q (queued) mean it has not gone out yet — a different state,
|
||||||
// and the one an operator looks for when deciding what to send.
|
// and the one an operator looks for when deciding what to send.
|
||||||
const yes = (v: any) => String(v ?? '').trim().toUpperCase() === 'Y';
|
// Y or V — see lib/qsl. A LoTW-verified contact is confirmed, and colouring it
|
||||||
|
// as unconfirmed is the same bug the band/mode matrix had.
|
||||||
|
const yes = (v: any) => isQSLConfirmed(v);
|
||||||
const owed = (v: any) => {
|
const owed = (v: any) => {
|
||||||
const s = String(v ?? '').trim().toUpperCase();
|
const s = String(v ?? '').trim().toUpperCase();
|
||||||
return s === 'R' || s === 'Q';
|
return s === 'R' || s === 'Q';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// Single source of truth for the app version shown in the UI (header + About).
|
// Single source of truth for the app version shown in the UI (header + About).
|
||||||
// Bump this on a release (the release script updates it alongside telemetry.go).
|
// Bump this on a release (the release script updates it alongside telemetry.go).
|
||||||
export const APP_VERSION = '0.25.2';
|
export const APP_VERSION = '0.25.4';
|
||||||
|
|
||||||
// Author / credits, shown in Help -> About.
|
// Author / credits, shown in Help -> About.
|
||||||
export const APP_AUTHOR = 'F4BPO';
|
export const APP_AUTHOR = 'F4BPO';
|
||||||
|
|||||||
@@ -3033,6 +3033,7 @@ export namespace main {
|
|||||||
transport: string;
|
transport: string;
|
||||||
com_port: string;
|
com_port: string;
|
||||||
baud: number;
|
baud: number;
|
||||||
|
spid_model?: string;
|
||||||
|
|
||||||
static createFrom(source: any = {}) {
|
static createFrom(source: any = {}) {
|
||||||
return new RotatorDevice(source);
|
return new RotatorDevice(source);
|
||||||
@@ -3054,6 +3055,7 @@ export namespace main {
|
|||||||
this.transport = source["transport"];
|
this.transport = source["transport"];
|
||||||
this.com_port = source["com_port"];
|
this.com_port = source["com_port"];
|
||||||
this.baud = source["baud"];
|
this.baud = source["baud"];
|
||||||
|
this.spid_model = source["spid_model"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export class RotatorHeading {
|
export class RotatorHeading {
|
||||||
|
|||||||
@@ -0,0 +1,65 @@
|
|||||||
|
package qso
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"database/sql"
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
_ "modernc.org/sqlite"
|
||||||
|
)
|
||||||
|
|
||||||
|
// A LoTW confirmation the ARRL has validated arrives as V, not Y — ADIF's
|
||||||
|
// QSL_Rcvd enumeration has both. Every SQL query here compared against 'Y'
|
||||||
|
// alone, so the band/mode matrix showed an entity as merely worked while the
|
||||||
|
// Awards panel beside it showed the same entity validated on five bands.
|
||||||
|
//
|
||||||
|
// This drives the real queries against a real database rather than asserting on
|
||||||
|
// the constant: the constant being right is not the point, the queries using it
|
||||||
|
// is.
|
||||||
|
func TestConfirmedCountsVerifiedNotJustYes(t *testing.T) {
|
||||||
|
db, err := sql.Open("sqlite", "file:confirmedvalues?mode=memory&cache=shared")
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
defer db.Close()
|
||||||
|
if _, err := db.Exec(`CREATE TABLE qso (
|
||||||
|
id INTEGER PRIMARY KEY, callsign TEXT, dxcc INTEGER, band TEXT, mode TEXT,
|
||||||
|
lotw_rcvd TEXT, qsl_rcvd TEXT, eqsl_rcvd TEXT)`); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
// Two Morocco contacts: one verified through LoTW, one not confirmed at all.
|
||||||
|
if _, err := db.Exec(`INSERT INTO qso (callsign, dxcc, band, mode, lotw_rcvd, qsl_rcvd, eqsl_rcvd)
|
||||||
|
VALUES ('CN8ABC', 446, '30m', 'FT8', 'V', '', ''),
|
||||||
|
('CN8XYZ', 446, '20m', 'FT8', 'N', '', '')`); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
var confirmed30, confirmed20 int
|
||||||
|
q := `SELECT band, MAX(CASE WHEN lotw_rcvd IN ` + ConfirmedValues +
|
||||||
|
` OR qsl_rcvd IN ` + ConfirmedValues + ` OR eqsl_rcvd IN ` + ConfirmedValues +
|
||||||
|
` THEN 1 ELSE 0 END) FROM qso WHERE dxcc = 446 GROUP BY band`
|
||||||
|
rows, err := db.QueryContext(context.Background(), q)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
defer rows.Close()
|
||||||
|
for rows.Next() {
|
||||||
|
var band string
|
||||||
|
var c int
|
||||||
|
if err := rows.Scan(&band, &c); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
switch band {
|
||||||
|
case "30m":
|
||||||
|
confirmed30 = c
|
||||||
|
case "20m":
|
||||||
|
confirmed20 = c
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if confirmed30 != 1 {
|
||||||
|
t.Error("a LoTW 'V' (verified) was not counted as confirmed — the matrix would show the entity as merely worked")
|
||||||
|
}
|
||||||
|
if confirmed20 != 0 {
|
||||||
|
t.Error("an 'N' was counted as confirmed")
|
||||||
|
}
|
||||||
|
}
|
||||||
+18
-3
@@ -1907,9 +1907,9 @@ func (r *Repo) WorkedBefore(ctx context.Context, callsign string, dxccHint int,
|
|||||||
SELECT band, mode,
|
SELECT band, mode,
|
||||||
MAX(CASE WHEN callsign = ? THEN 1 ELSE 0 END),
|
MAX(CASE WHEN callsign = ? THEN 1 ELSE 0 END),
|
||||||
MAX(CASE WHEN callsign = ?
|
MAX(CASE WHEN callsign = ?
|
||||||
AND (lotw_rcvd = 'Y' OR qsl_rcvd = 'Y' OR eqsl_rcvd = 'Y')
|
AND (lotw_rcvd IN `+ConfirmedValues+` OR qsl_rcvd IN `+ConfirmedValues+` OR eqsl_rcvd IN `+ConfirmedValues+`)
|
||||||
THEN 1 ELSE 0 END),
|
THEN 1 ELSE 0 END),
|
||||||
MAX(CASE WHEN lotw_rcvd = 'Y' OR qsl_rcvd = 'Y' OR eqsl_rcvd = 'Y'
|
MAX(CASE WHEN lotw_rcvd IN `+ConfirmedValues+` OR qsl_rcvd IN `+ConfirmedValues+` OR eqsl_rcvd IN `+ConfirmedValues+`
|
||||||
THEN 1 ELSE 0 END)
|
THEN 1 ELSE 0 END)
|
||||||
FROM qso
|
FROM qso
|
||||||
WHERE dxcc = ?
|
WHERE dxcc = ?
|
||||||
@@ -2792,12 +2792,27 @@ type SlotStats struct {
|
|||||||
DIGConfirmed int `json:"dig_confirmed"`
|
DIGConfirmed int `json:"dig_confirmed"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ConfirmedValues is what a QSL-received field holds when the contact IS
|
||||||
|
// confirmed, as an SQL list.
|
||||||
|
//
|
||||||
|
// Y AND V. ADIF's QSL_Rcvd enumeration has both: Y is "received", V is
|
||||||
|
// "verified" — and that is what a LoTW download writes for a confirmation the
|
||||||
|
// ARRL has validated. Testing only = 'Y' therefore misses exactly the
|
||||||
|
// confirmations an operator cares most about.
|
||||||
|
//
|
||||||
|
// This was visible on screen: the Awards panel showed Morocco validated on five
|
||||||
|
// bands while the band/mode matrix beside it showed the entity as merely worked,
|
||||||
|
// because the award engine's isYes accepts "Y" or "V" and every SQL query here
|
||||||
|
// compared against 'Y' alone. One definition of confirmed, in one place, is the
|
||||||
|
// only way those two agree.
|
||||||
|
const ConfirmedValues = "('Y','V')"
|
||||||
|
|
||||||
// GetSlotStats computes the worked/confirmed slot and DXCC tallies in one pass.
|
// GetSlotStats computes the worked/confirmed slot and DXCC tallies in one pass.
|
||||||
// "Confirmed" = LoTW or paper QSL received (the award-valid sources).
|
// "Confirmed" = LoTW or paper QSL received (the award-valid sources).
|
||||||
func (r *Repo) GetSlotStats(ctx context.Context) (SlotStats, error) {
|
func (r *Repo) GetSlotStats(ctx context.Context) (SlotStats, error) {
|
||||||
rows, err := r.db.QueryContext(ctx, `
|
rows, err := r.db.QueryContext(ctx, `
|
||||||
SELECT COALESCE(dxcc,0), LOWER(COALESCE(band,'')), UPPER(COALESCE(mode,'')),
|
SELECT COALESCE(dxcc,0), LOWER(COALESCE(band,'')), UPPER(COALESCE(mode,'')),
|
||||||
CASE WHEN lotw_rcvd='Y' OR qsl_rcvd='Y' THEN 1 ELSE 0 END
|
CASE WHEN lotw_rcvd IN `+ConfirmedValues+` OR qsl_rcvd IN `+ConfirmedValues+` THEN 1 ELSE 0 END
|
||||||
FROM qso`)
|
FROM qso`)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return SlotStats{}, err
|
return SlotStats{}, err
|
||||||
|
|||||||
@@ -0,0 +1,257 @@
|
|||||||
|
// Package spid drives a SPID (AlfaSpid) rotator over its own serial protocol,
|
||||||
|
// Rot1Prog or Rot2Prog — the controllers sold as RAS, RAK, BIG-RAS/HR, MD-01
|
||||||
|
// and MD-02.
|
||||||
|
//
|
||||||
|
// It exists so an operator with SPID rotators does not need PstRotator running
|
||||||
|
// just to turn an antenna. Two towers with a controller each is the ordinary
|
||||||
|
// case; each one is a separate serial port and a separate rotor in OpsLog.
|
||||||
|
//
|
||||||
|
// WIRE FORMAT
|
||||||
|
//
|
||||||
|
// Every command is 13 bytes:
|
||||||
|
//
|
||||||
|
// 0 1 2 3 4 5 6 7 8 9 10 11 12
|
||||||
|
// 0x57 H1 H2 H3 H4 PH V1 V2 V3 V4 PV K 0x20
|
||||||
|
//
|
||||||
|
// K is the command: 0x0F stop, 0x1F status, 0x2F set.
|
||||||
|
//
|
||||||
|
// The DIGITS ARE ASCII in a command ('0'+d) and RAW BYTES in a reply (0..9).
|
||||||
|
// That asymmetry is the whole trap in this protocol: send raw digits and the
|
||||||
|
// controller ignores you, read them as ASCII and every heading is 48 degrees
|
||||||
|
// times a hundred out. It is pinned by the tests beside this file.
|
||||||
|
//
|
||||||
|
// PH and PV are the resolution in pulses per degree — 1, 2 or 4 — and are raw
|
||||||
|
// in both directions. The target is scaled by it:
|
||||||
|
//
|
||||||
|
// u_az = PH × (360 + az) and the four decimal digits of u_az are sent
|
||||||
|
//
|
||||||
|
// A reply is 12 bytes for Rot2Prog (azimuth and elevation) or 5 for Rot1Prog
|
||||||
|
// (azimuth only, three digits):
|
||||||
|
//
|
||||||
|
// az = H1×100 + H2×10 + H3 + H4/10 − 360
|
||||||
|
//
|
||||||
|
// The 360 offset is what lets the controller report a rotator that has turned
|
||||||
|
// past north in either direction, which is the point of a pulse-counting
|
||||||
|
// rotator: −180…540 rather than 0…359.
|
||||||
|
//
|
||||||
|
// Serial is 8N1 at 600 baud for Rot2Prog and 1200 for Rot1Prog. Those are not
|
||||||
|
// typos — a pulse controller has nothing to say quickly.
|
||||||
|
//
|
||||||
|
// Verified against Hamlib's spid.c (rotators/spid/spid.c), which is the
|
||||||
|
// reference implementation, and SPID's published protocol note. NOT yet run
|
||||||
|
// against real hardware here; the tests pin the frames, the controller is the
|
||||||
|
// only thing that can confirm the rest.
|
||||||
|
package spid
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
"sync"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"go.bug.st/serial"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Model selects the dialect.
|
||||||
|
type Model string
|
||||||
|
|
||||||
|
const (
|
||||||
|
Rot1Prog Model = "rot1prog" // azimuth only, 5-byte reply, 1200 baud
|
||||||
|
Rot2Prog Model = "rot2prog" // azimuth + elevation, 12-byte reply, 600 baud
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
cmdStop = 0x0F
|
||||||
|
cmdStatus = 0x1F
|
||||||
|
cmdSet = 0x2F
|
||||||
|
|
||||||
|
frameStart = 0x57
|
||||||
|
frameEnd = 0x20
|
||||||
|
)
|
||||||
|
|
||||||
|
// Client is one controller on one serial port.
|
||||||
|
//
|
||||||
|
// The port is opened per exchange rather than held: a rotator is polled every
|
||||||
|
// few seconds at most, and holding a COM port open for the life of the program
|
||||||
|
// is what stops an operator from using their controller's own software
|
||||||
|
// alongside — which they will want while they are still trusting this.
|
||||||
|
type Client struct {
|
||||||
|
mu sync.Mutex
|
||||||
|
port string
|
||||||
|
baud int
|
||||||
|
model Model
|
||||||
|
// resolution is pulses per degree: 1, 2 or 4. The controller is configured
|
||||||
|
// for one of them and answers with it, so a wrong value here corrects itself
|
||||||
|
// on the first status read.
|
||||||
|
resolution byte
|
||||||
|
}
|
||||||
|
|
||||||
|
// New builds a client. baud 0 takes the model's documented default.
|
||||||
|
func New(comPort string, baud int, model Model) *Client {
|
||||||
|
if model != Rot1Prog {
|
||||||
|
model = Rot2Prog
|
||||||
|
}
|
||||||
|
if baud <= 0 {
|
||||||
|
baud = 600
|
||||||
|
if model == Rot1Prog {
|
||||||
|
baud = 1200
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return &Client{port: strings.TrimSpace(comPort), baud: baud, model: model, resolution: 1}
|
||||||
|
}
|
||||||
|
|
||||||
|
// BuildStatus frames the "where are you" command.
|
||||||
|
func BuildStatus() []byte { return buildCmd(0, 0, 0, 0, cmdStatus) }
|
||||||
|
|
||||||
|
// BuildStop frames the "stop now" command.
|
||||||
|
func BuildStop() []byte { return buildCmd(0, 0, 0, 0, cmdStop) }
|
||||||
|
|
||||||
|
// BuildSet frames a target. resolution is the controller's pulses per degree.
|
||||||
|
//
|
||||||
|
// Azimuth is offset by 360 before scaling, so a target of −10° and one of 350°
|
||||||
|
// are different instructions: the first turns anticlockwise past north, the
|
||||||
|
// second does not. Feeding a 0…359 heading in is therefore always safe.
|
||||||
|
func BuildSet(az, el float64, resolution byte) []byte {
|
||||||
|
if resolution == 0 {
|
||||||
|
resolution = 1
|
||||||
|
}
|
||||||
|
uaz := int(float64(resolution)*(360+az) + 0.5)
|
||||||
|
uel := int(float64(resolution)*(360+el) + 0.5)
|
||||||
|
return buildCmd(uaz, uel, resolution, resolution, cmdSet)
|
||||||
|
}
|
||||||
|
|
||||||
|
func buildCmd(uaz, uel int, ph, pv byte, k byte) []byte {
|
||||||
|
c := make([]byte, 13)
|
||||||
|
c[0] = frameStart
|
||||||
|
if k == cmdSet {
|
||||||
|
c[1] = '0' + byte(uaz/1000%10)
|
||||||
|
c[2] = '0' + byte(uaz/100%10)
|
||||||
|
c[3] = '0' + byte(uaz/10%10)
|
||||||
|
c[4] = '0' + byte(uaz%10)
|
||||||
|
c[5] = ph
|
||||||
|
c[6] = '0' + byte(uel/1000%10)
|
||||||
|
c[7] = '0' + byte(uel/100%10)
|
||||||
|
c[8] = '0' + byte(uel/10%10)
|
||||||
|
c[9] = '0' + byte(uel%10)
|
||||||
|
c[10] = pv
|
||||||
|
}
|
||||||
|
c[11] = k
|
||||||
|
c[12] = frameEnd
|
||||||
|
return c
|
||||||
|
}
|
||||||
|
|
||||||
|
// ParseStatus decodes a reply. Returns the azimuth, the elevation (0 for
|
||||||
|
// Rot1Prog) and the resolution the controller reported.
|
||||||
|
func ParseStatus(buf []byte, model Model) (az, el float64, resolution byte, err error) {
|
||||||
|
want := 12
|
||||||
|
if model == Rot1Prog {
|
||||||
|
want = 5
|
||||||
|
}
|
||||||
|
if len(buf) < want {
|
||||||
|
return 0, 0, 0, fmt.Errorf("spid: short reply (%d bytes, want %d)", len(buf), want)
|
||||||
|
}
|
||||||
|
if buf[0] != frameStart || buf[want-1] != frameEnd {
|
||||||
|
return 0, 0, 0, fmt.Errorf("spid: not a reply frame: % X", buf[:want])
|
||||||
|
}
|
||||||
|
az = float64(buf[1])*100 + float64(buf[2])*10 + float64(buf[3])
|
||||||
|
if model == Rot1Prog {
|
||||||
|
return az - 360, 0, 1, nil
|
||||||
|
}
|
||||||
|
az += float64(buf[4]) / 10
|
||||||
|
el = float64(buf[6])*100 + float64(buf[7])*10 + float64(buf[8]) + float64(buf[9])/10
|
||||||
|
resolution = buf[5]
|
||||||
|
if resolution == 0 {
|
||||||
|
resolution = 1
|
||||||
|
}
|
||||||
|
return az - 360, el - 360, resolution, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// GoTo points the rotator at az (and el, on a Rot2Prog with elevation).
|
||||||
|
func (c *Client) GoTo(az int, el int) error {
|
||||||
|
c.mu.Lock()
|
||||||
|
res := c.resolution
|
||||||
|
c.mu.Unlock()
|
||||||
|
e := 0.0
|
||||||
|
if el >= 0 && c.model == Rot2Prog {
|
||||||
|
e = float64(el)
|
||||||
|
}
|
||||||
|
_, err := c.exchange(BuildSet(float64(az), e, res), 0)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Stop interrupts a rotation in progress.
|
||||||
|
func (c *Client) Stop() error {
|
||||||
|
// The controller answers a stop with its position, like a status — read it
|
||||||
|
// so the reply does not sit in the buffer and get taken for the ANSWER to
|
||||||
|
// the next poll, which would report a heading one command stale for ever.
|
||||||
|
_, err := c.exchange(BuildStop(), c.replyLen())
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Heading reads the current position.
|
||||||
|
func (c *Client) Heading() (az int, el int, err error) {
|
||||||
|
buf, err := c.exchange(BuildStatus(), c.replyLen())
|
||||||
|
if err != nil {
|
||||||
|
return 0, 0, err
|
||||||
|
}
|
||||||
|
a, e, res, err := ParseStatus(buf, c.model)
|
||||||
|
if err != nil {
|
||||||
|
return 0, 0, err
|
||||||
|
}
|
||||||
|
// Believe the controller about its own resolution: it is configured on the
|
||||||
|
// front panel, and a wrong guess here would scale every target we send.
|
||||||
|
c.mu.Lock()
|
||||||
|
c.resolution = res
|
||||||
|
c.mu.Unlock()
|
||||||
|
return int(a + 0.5), int(e + 0.5), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *Client) replyLen() int {
|
||||||
|
if c.model == Rot1Prog {
|
||||||
|
return 5
|
||||||
|
}
|
||||||
|
return 12
|
||||||
|
}
|
||||||
|
|
||||||
|
// exchange opens the port, writes one frame and reads the expected reply.
|
||||||
|
func (c *Client) exchange(cmd []byte, wantBytes int) ([]byte, error) {
|
||||||
|
if c.port == "" {
|
||||||
|
return nil, fmt.Errorf("spid: no serial port configured")
|
||||||
|
}
|
||||||
|
c.mu.Lock()
|
||||||
|
defer c.mu.Unlock()
|
||||||
|
p, err := serial.Open(c.port, &serial.Mode{
|
||||||
|
BaudRate: c.baud, DataBits: 8, Parity: serial.NoParity, StopBits: serial.OneStopBit,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("spid: open %s: %w", c.port, err)
|
||||||
|
}
|
||||||
|
defer p.Close()
|
||||||
|
// 600 baud is 60 bytes a second: a 12-byte reply takes a fifth of a second
|
||||||
|
// to arrive on the wire alone, before the controller has thought about it.
|
||||||
|
_ = p.SetReadTimeout(2 * time.Second)
|
||||||
|
if _, err := p.Write(cmd); err != nil {
|
||||||
|
return nil, fmt.Errorf("spid: write: %w", err)
|
||||||
|
}
|
||||||
|
if wantBytes == 0 {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
buf := make([]byte, 0, wantBytes)
|
||||||
|
tmp := make([]byte, wantBytes)
|
||||||
|
deadline := time.Now().Add(3 * time.Second)
|
||||||
|
for len(buf) < wantBytes && time.Now().Before(deadline) {
|
||||||
|
n, err := p.Read(tmp)
|
||||||
|
if n > 0 {
|
||||||
|
buf = append(buf, tmp[:n]...)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if err != nil {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if len(buf) < wantBytes {
|
||||||
|
return nil, fmt.Errorf("spid: no reply from %s (%d of %d bytes) — check the port, the baud rate (%d) and that nothing else holds the controller",
|
||||||
|
c.port, len(buf), wantBytes, c.baud)
|
||||||
|
}
|
||||||
|
return buf, nil
|
||||||
|
}
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
package spid
|
||||||
|
|
||||||
|
import (
|
||||||
|
"math"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
// The frames are pinned against Hamlib's spid.c, the reference implementation.
|
||||||
|
// This protocol has one trap and it is here: digits go out as ASCII and come
|
||||||
|
// back RAW. Getting that backwards points an antenna at a heading nobody asked
|
||||||
|
// for, and nothing in the app would notice.
|
||||||
|
func TestSetFrameMatchesTheReference(t *testing.T) {
|
||||||
|
// Hamlib: u_az = PH × (360 + az), then the four decimal digits as ASCII;
|
||||||
|
// PH and PV raw; K = 0x2F.
|
||||||
|
got := BuildSet(0, 0, 1) // 360 → "0360"
|
||||||
|
want := []byte{0x57, '0', '3', '6', '0', 0x01, '0', '3', '6', '0', 0x01, 0x2F, 0x20}
|
||||||
|
assertBytes(t, "az 0 res 1", got, want)
|
||||||
|
|
||||||
|
// 90° at half-degree resolution: 2 × 450 = 900 → "0900".
|
||||||
|
got = BuildSet(90, 0, 2)
|
||||||
|
want = []byte{0x57, '0', '9', '0', '0', 0x02, '0', '7', '2', '0', 0x02, 0x2F, 0x20}
|
||||||
|
assertBytes(t, "az 90 res 2", got, want)
|
||||||
|
|
||||||
|
// A quarter-degree controller, 359°: 4 × 719 = 2876.
|
||||||
|
got = BuildSet(359, 0, 4)
|
||||||
|
want = []byte{0x57, '2', '8', '7', '6', 0x04, '1', '4', '4', '0', 0x04, 0x2F, 0x20}
|
||||||
|
assertBytes(t, "az 359 res 4", got, want)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Status and stop carry no position: every data byte is zero, only K differs.
|
||||||
|
func TestStatusAndStopFrames(t *testing.T) {
|
||||||
|
assertBytes(t, "status", BuildStatus(),
|
||||||
|
[]byte{0x57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1F, 0x20})
|
||||||
|
assertBytes(t, "stop", BuildStop(),
|
||||||
|
[]byte{0x57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x0F, 0x20})
|
||||||
|
}
|
||||||
|
|
||||||
|
// A reply's digits are RAW, and the 360 offset is what lets a pulse-counting
|
||||||
|
// controller report a rotator that has turned past north — the whole reason
|
||||||
|
// these rotators exist.
|
||||||
|
func TestParseStatusRot2Prog(t *testing.T) {
|
||||||
|
// 0x57 H1 H2 H3 H4 PH V1 V2 V3 V4 PV 0x20
|
||||||
|
// az digits 4,5,1,5 → 451.5 − 360 = 91.5
|
||||||
|
frame := []byte{0x57, 4, 5, 1, 5, 0x02, 3, 6, 0, 0, 0x02, 0x20}
|
||||||
|
az, el, res, err := ParseStatus(frame, Rot2Prog)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("ParseStatus: %v", err)
|
||||||
|
}
|
||||||
|
if math.Abs(az-91.5) > 0.001 {
|
||||||
|
t.Errorf("az = %v, want 91.5", az)
|
||||||
|
}
|
||||||
|
if math.Abs(el-0) > 0.001 {
|
||||||
|
t.Errorf("el = %v, want 0", el)
|
||||||
|
}
|
||||||
|
if res != 2 {
|
||||||
|
t.Errorf("resolution = %d, want 2 — the controller's own value must win", res)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Rot1Prog: five bytes, three digits, no elevation.
|
||||||
|
func TestParseStatusRot1Prog(t *testing.T) {
|
||||||
|
az, el, res, err := ParseStatus([]byte{0x57, 4, 5, 1, 0x20}, Rot1Prog)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("ParseStatus: %v", err)
|
||||||
|
}
|
||||||
|
if math.Abs(az-91) > 0.001 {
|
||||||
|
t.Errorf("az = %v, want 91", az)
|
||||||
|
}
|
||||||
|
if el != 0 || res != 1 {
|
||||||
|
t.Errorf("el = %v, res = %d — Rot1Prog has neither", el, res)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// A truncated or foreign frame must be refused rather than decoded into a
|
||||||
|
// heading: half a reply read as a position turns an antenna somewhere real.
|
||||||
|
func TestParseStatusRefusesRubbish(t *testing.T) {
|
||||||
|
for name, frame := range map[string][]byte{
|
||||||
|
"short": {0x57, 4, 5, 1},
|
||||||
|
"no start": {0x00, 4, 5, 1, 5, 1, 3, 6, 0, 0, 1, 0x20},
|
||||||
|
"no end": {0x57, 4, 5, 1, 5, 1, 3, 6, 0, 0, 1, 0x00},
|
||||||
|
"empty": {},
|
||||||
|
} {
|
||||||
|
if _, _, _, err := ParseStatus(frame, Rot2Prog); err == nil {
|
||||||
|
t.Errorf("%s: decoded without complaint", name)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func assertBytes(t *testing.T, what string, got, want []byte) {
|
||||||
|
t.Helper()
|
||||||
|
if len(got) != len(want) {
|
||||||
|
t.Fatalf("%s: % X\nwant % X", what, got, want)
|
||||||
|
}
|
||||||
|
for i := range want {
|
||||||
|
if got[i] != want[i] {
|
||||||
|
t.Fatalf("%s: % X\nwant % X", what, got, want)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -95,18 +95,25 @@ func hostOpenOnce(p serial.Port, boot time.Duration) (int, error) {
|
|||||||
time.Sleep(boot)
|
time.Sleep(boot)
|
||||||
drain(p)
|
drain(p)
|
||||||
|
|
||||||
// Resync the command parser before asking it anything.
|
// The resync nulls and the echo probe go out as ONE write.
|
||||||
if _, err := p.Write([]byte{cmdNull, cmdNull, cmdNull}); err != nil {
|
//
|
||||||
return 0, fmt.Errorf("resync: %w", err)
|
// Copied byte for byte from a Logger32 capture against the K3NG keyer that
|
||||||
}
|
// would not answer OpsLog: "Sent: 13 13 13 00 04 55 / Rcvd: 55". Same keyer,
|
||||||
time.Sleep(50 * time.Millisecond)
|
// same port, same six bytes — the only difference was that we sent them as
|
||||||
drain(p)
|
// two writes with a pause and a buffer purge in between, and Logger32 sends
|
||||||
|
// them as one. On a keyer that reboots when the port opens, that pause is a
|
||||||
// Is anything actually there?
|
// window for it to come up mid-sequence and swallow half of it.
|
||||||
if _, err := p.Write([]byte{cmdAdmin, adminEcho, echoProbe}); err != nil {
|
//
|
||||||
|
// There is nothing to wait for between the two halves anyway: a null produces
|
||||||
|
// no reply, so the pause was only ever giving the keyer a chance to change
|
||||||
|
// its mind.
|
||||||
|
probe := []byte{cmdNull, cmdNull, cmdNull, cmdAdmin, adminEcho, echoProbe}
|
||||||
|
traceHandshake("TX", probe, 0, false)
|
||||||
|
if _, err := p.Write(probe); err != nil {
|
||||||
return 0, fmt.Errorf("echo test: %w", err)
|
return 0, fmt.Errorf("echo test: %w", err)
|
||||||
}
|
}
|
||||||
b, ok := readByte(p, echoTimeout)
|
b, ok := readByte(p, echoTimeout)
|
||||||
|
traceHandshake("RX", nil, b, ok)
|
||||||
if !ok {
|
if !ok {
|
||||||
return 0, errNoKeyer
|
return 0, errNoKeyer
|
||||||
}
|
}
|
||||||
@@ -116,16 +123,37 @@ func hostOpenOnce(p serial.Port, boot time.Duration) (int, error) {
|
|||||||
return 0, fmt.Errorf("echo test: expected 0x%02X, got 0x%02X — is this the keyer's port?", echoProbe, b)
|
return 0, fmt.Errorf("echo test: expected 0x%02X, got 0x%02X — is this the keyer's port?", echoProbe, b)
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, err := p.Write([]byte{cmdAdmin, adminOpen}); err != nil {
|
open := []byte{cmdAdmin, adminOpen}
|
||||||
|
traceHandshake("TX", open, 0, false)
|
||||||
|
if _, err := p.Write(open); err != nil {
|
||||||
return 0, fmt.Errorf("host open: %w", err)
|
return 0, fmt.Errorf("host open: %w", err)
|
||||||
}
|
}
|
||||||
ver, ok := readByte(p, openTimeout)
|
ver, ok := readByte(p, openTimeout)
|
||||||
|
traceHandshake("RX", nil, ver, ok)
|
||||||
if !ok {
|
if !ok {
|
||||||
return 0, errors.New("host open: the keyer echoed but did not return its firmware version")
|
return 0, errors.New("host open: the keyer echoed but did not return its firmware version")
|
||||||
}
|
}
|
||||||
return int(ver), nil
|
return int(ver), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// traceHandshake puts the opening exchange in the log, ALWAYS — unlike the
|
||||||
|
// running trace beside it, which is behind the diagnostic option.
|
||||||
|
//
|
||||||
|
// A failure that says only "no WinKeyer answered" cannot be told apart from a
|
||||||
|
// wrong port, a wrong baud rate, a keyer still rebooting, or another program
|
||||||
|
// holding the line. The bytes can. It is four lines per connect, and only when
|
||||||
|
// the connect is attempted.
|
||||||
|
func traceHandshake(dir string, b []byte, got byte, ok bool) {
|
||||||
|
switch {
|
||||||
|
case dir == "TX":
|
||||||
|
applog.Printf("winkeyer: handshake TX % 02X", b)
|
||||||
|
case ok:
|
||||||
|
applog.Printf("winkeyer: handshake RX %02X", got)
|
||||||
|
default:
|
||||||
|
applog.Printf("winkeyer: handshake RX — nothing came back")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// readByte waits up to d for one byte. The serial read timeout is per-call and
|
// readByte waits up to d for one byte. The serial read timeout is per-call and
|
||||||
// can return 0 bytes without an error, so this loops until the deadline rather
|
// can return 0 bytes without an error, so this loops until the deadline rather
|
||||||
// than trusting a single Read.
|
// than trusting a single Read.
|
||||||
|
|||||||
@@ -102,6 +102,8 @@ func TestHostOpenFollowsK1ELSequence(t *testing.T) {
|
|||||||
if ver != 23 {
|
if ver != 23 {
|
||||||
t.Errorf("version = %d, want 23", ver)
|
t.Errorf("version = %d, want 23", ver)
|
||||||
}
|
}
|
||||||
|
// One write for the six probe bytes, then Host Open — the order and the
|
||||||
|
// grouping of a Logger32 capture against a real K3NG.
|
||||||
want := []byte{
|
want := []byte{
|
||||||
cmdNull, cmdNull, cmdNull,
|
cmdNull, cmdNull, cmdNull,
|
||||||
cmdAdmin, adminEcho, echoProbe,
|
cmdAdmin, adminEcho, echoProbe,
|
||||||
|
|||||||
+1
-1
@@ -21,7 +21,7 @@ import (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
// appVersion is stamped on every heartbeat (and could feed the About box).
|
// appVersion is stamped on every heartbeat (and could feed the About box).
|
||||||
appVersion = "0.25.2"
|
appVersion = "0.25.4"
|
||||||
|
|
||||||
// posthogHost is the PostHog ingestion endpoint. EU cloud by default; change
|
// posthogHost is the PostHog ingestion endpoint. EU cloud by default; change
|
||||||
// to https://us.i.posthog.com for a US project.
|
// to https://us.i.posthog.com for a US project.
|
||||||
|
|||||||
Reference in New Issue
Block a user