fix(tci): subscribe to the radio's meters; fix the new-spot count; explain an SMTP refusal
TCI meters: the S-meter came only from RX_SMETER and the transmit meters from TX_POWER / TX_SWR — commands ExpertSDR3 does not send. The protocol's answer is a subscription (RX_SENSORS_ENABLE / TX_SENSORS_ENABLE, §4.4 of the TCI PDF), after which the radio pushes RX_CHANNEL_SENSORS and TX_SENSORS. Nobody had asked, so the console's meters sat empty in RX and in TX while everything else worked. Cluster: the held-spot counter looked for the row it froze on. A station spotted again REPLACES its row, so that row vanishes in the ordinary course of things and the count fell through to 'everything is new' — 4, 5, then 500. Counted by timestamp now, which survives both the replacement and the ring buffer. SMTP: '535 5.7.139 basic authentication is disabled' is a policy, not a typo. The message now says so, and says what actually helps, without claiming a policy when the server simply rejected the password.
This commit is contained in:
@@ -233,6 +233,42 @@ func (t *TCI) handlePanel(name string, get func(int) string, args string) bool {
|
||||
if n, ok := num(get(1)); ok && forRX0() {
|
||||
p.SMeter = n
|
||||
}
|
||||
// The meters of ExpertSDR3. The S-meter used to be read only from RX_SMETER
|
||||
// and the transmit ones from TX_POWER / TX_SWR — commands this radio simply
|
||||
// never sends, which is why the console's meters sat empty on a SunSDR in
|
||||
// both RX and TX while everything else worked.
|
||||
//
|
||||
// The protocol's own answer (TCI Protocol.pdf, §4.4) is a SUBSCRIPTION:
|
||||
//
|
||||
// RX_SENSORS:<rx>,<dBm>; (deprecated in 2.0)
|
||||
// RX_CHANNEL_SENSORS:<rx>,<channel>,<dBm>; (its replacement)
|
||||
// TX_SENSORS:<trx>,<mic dBm>,<power W>,<peak W>,<SWR>;
|
||||
//
|
||||
// none of which arrives until the client asks with RX_SENSORS_ENABLE and
|
||||
// TX_SENSORS_ENABLE — see Connect.
|
||||
case "rx_sensors":
|
||||
if v, err := strconv.ParseFloat(strings.TrimSpace(get(1)), 64); err == nil && forRX0() {
|
||||
p.SMeter = int(v)
|
||||
}
|
||||
case "rx_channel_sensors":
|
||||
// Main channel (A) of receiver 0: the one the console is showing.
|
||||
if v, err := strconv.ParseFloat(strings.TrimSpace(get(2)), 64); err == nil &&
|
||||
get(0) == "0" && get(1) == "0" {
|
||||
p.SMeter = int(v)
|
||||
}
|
||||
case "tx_sensors":
|
||||
if get(0) != "0" {
|
||||
break
|
||||
}
|
||||
// arg3 is RMS power, arg4 the peak. The peak is what a power meter's
|
||||
// needle does on speech; the RMS is what the operator is asked to keep
|
||||
// under the amplifier's limit — so RMS is the number, as elsewhere.
|
||||
if v, err := strconv.ParseFloat(strings.TrimSpace(get(2)), 64); err == nil {
|
||||
p.TXPowerW = v
|
||||
}
|
||||
if v, err := strconv.ParseFloat(strings.TrimSpace(get(4)), 64); err == nil {
|
||||
p.TXSWR = v
|
||||
}
|
||||
case "tune":
|
||||
if forRX0() {
|
||||
p.Tuning = yes(get(1))
|
||||
|
||||
Reference in New Issue
Block a user