feat(decodes): answer a station on click, DT and Freq, badge filters
Clicking a decode now ANSWERS it. It sends WSJT-X/MSHV a Reply message (type 4), which is the same thing as double-clicking the line in their own Band Activity window: the application looks the decode up, sets its transmit frequency to the caller's and starts the exchange. It deliberately does not tune the radio, which is what it did before and why nothing happened. On FT8 the whole band sits inside one passband, so moving the dial changes nothing about who gets answered - the decision belongs to the decoding application, and the Reply is the only way to hand it over. Tuning would also just fight it for the VFO. The entry is still filled so the QSO can be logged here. The reply is routed by PROGRAM ID, not by listener: two receivers can share one multicast group, and answering a station heard on the 6 m instance by talking to the 20 m one would start a call on the wrong band. It goes to the address that instance's packets actually arrive from - a multicast listener must answer the sender, never the group. WSJT-X matches the reply against its own decode list, so the payload replays the decode field for field: time, snr, delta time, audio offset, mode and message text. Two columns added, DT and Freq - the audio offset inside the passband, not the RF frequency, which is the same for every station in the list and says nothing. Past about two seconds DT takes a warning tint: that station is drifting out of the window. The transmit strip. "You cannot see what you are sending, or who you are calling" - two separate faults. The message was only ever threaded into its period, and in FT8 you transmit in the slots you are NOT receiving in, so its period had no decodes and the whole line was dropped; a transmit slot now creates its period. And the state is a strip of its own at the top, because it is the one thing on the screen that is about the operator rather than the band. It is fed by every Status rather than only by one carrying transmit text, so it can still name the station being called on MSHV and older JTDX builds, which stop before tx_message in the Status payload. "New only" became per-category badges, in the colours and the vocabulary of the Chase New panel. None lit shows the whole band - this is a decode log first, and a panel that opened by hiding most of the traffic would be lying about what is on the air.
This commit is contained in:
@@ -12668,17 +12668,24 @@ func (a *App) consumeUDPEvents() {
|
||||
if a.ctx == nil {
|
||||
continue
|
||||
}
|
||||
// The operator's own transmit message, from Status. Emitted before the
|
||||
// switch because a Status can carry BOTH a DX call and a transmit
|
||||
// message, and the switch below takes only one branch.
|
||||
if ev.TxMessage != "" {
|
||||
wruntime.EventsEmit(a.ctx, "udp:tx_message", map[string]any{
|
||||
// The operator's own transmit state, from Status. Emitted before the
|
||||
// switch because a Status carries BOTH a DX call and a transmit message,
|
||||
// and the switch below takes only one branch.
|
||||
//
|
||||
// Sent on EVERY Status, not only when there is a transmit message: MSHV
|
||||
// and older JTDX builds stop before tx_message in the Status payload, and
|
||||
// the panel still has to be able to say who is being called and whether
|
||||
// the carrier is up. A Status always carries de_call, so that is the test.
|
||||
if ev.DECall != "" || ev.TxMessage != "" {
|
||||
wruntime.EventsEmit(a.ctx, "udp:tx_state", map[string]any{
|
||||
"msg": ev.TxMessage,
|
||||
"transmitting": ev.Transmitting,
|
||||
"de_call": ev.DECall,
|
||||
"dx_call": ev.DXCall,
|
||||
"mode": ev.Mode,
|
||||
"freq_hz": ev.FreqHz,
|
||||
"band": bandForHz(ev.FreqHz),
|
||||
"instance": ev.ProgramID,
|
||||
"at": time.Now().UTC().Format(time.RFC3339),
|
||||
})
|
||||
}
|
||||
@@ -12713,6 +12720,12 @@ func (a *App) consumeUDPEvents() {
|
||||
"off_air": ev.DecodeOffAir,
|
||||
"source": ev.Source,
|
||||
"instance": ev.ProgramID,
|
||||
"dt": ev.DecodeDT,
|
||||
"audio_hz": ev.DecodeAudioHz,
|
||||
// Carried so a click can answer the station: WSJT-X matches a
|
||||
// Reply against its own decode list, field for field.
|
||||
"ms": ev.DecodeMs,
|
||||
"low_conf": ev.DecodeLowConf,
|
||||
})
|
||||
// A WSJT-X decode (heard station). Render it on the FlexRadio
|
||||
// panadapter when the option is on; green + SNR comment, auto-expiring
|
||||
@@ -18339,6 +18352,37 @@ type GridCacheStatus struct {
|
||||
Pending int `json:"pending"` // waiting for the next batch write
|
||||
}
|
||||
|
||||
// AnswerDecode tells the decoding application to call a station — the same
|
||||
// thing as double-clicking the line in WSJT-X's own Band Activity window.
|
||||
//
|
||||
// This is not something OpsLog can do by tuning the radio. On FT8 the whole band
|
||||
// sits inside one passband, so moving the dial changes nothing about who gets
|
||||
// answered: the decision belongs to WSJT-X/MSHV, and the Reply message is the
|
||||
// only way to hand it over. The panel therefore does NOT retune the rig on a
|
||||
// click, which would only fight the digital application for the VFO.
|
||||
//
|
||||
// Every argument replays the decode as it arrived, because the target matches it
|
||||
// against its own decode list and ignores anything it cannot find.
|
||||
func (a *App) AnswerDecode(instance string, ms uint32, snr int, dt float64, audioHz int64, mode, msg string, lowConf bool) error {
|
||||
if a.udp == nil {
|
||||
return fmt.Errorf("udp not initialized")
|
||||
}
|
||||
err := a.udp.SendReply(udp.Reply{
|
||||
ProgramID: instance,
|
||||
MsSinceMidnig: ms,
|
||||
SNR: int32(snr),
|
||||
DeltaTime: dt,
|
||||
DeltaFreqHz: uint32(audioHz),
|
||||
Mode: mode,
|
||||
Message: msg,
|
||||
LowConfidence: lowConf,
|
||||
})
|
||||
if err != nil {
|
||||
applog.Printf("udp: answer decode %q on %q failed: %v", msg, instance, err)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
// GetGridCacheStatus reports what the locator store holds.
|
||||
func (a *App) GetGridCacheStatus() GridCacheStatus {
|
||||
out := GridCacheStatus{Enabled: a.gridStore != nil}
|
||||
|
||||
Reference in New Issue
Block a user