fix(tci): send the sensor subscription in both cases
Two rounds of fixes and the SunSDR's meters are still silent. The one remaining difference from the protocol document is the case: its examples read TX_SENSORS_ENABLE:true,200; and ours went out lower-case. Every other command works lower-case, but nothing proves this newer path does — a case-insensitive server ignores the duplicate, a sensitive one finally hears it.
This commit is contained in:
+8
-1
@@ -466,9 +466,16 @@ func (t *TCI) SetTXAudioSource(src string) {
|
||||
// "ready", because a subscription sent during the server's initial dump can be
|
||||
// dropped. 200 ms is the rate the protocol's own examples use.
|
||||
func (t *TCI) subscribeSensors(when string) {
|
||||
// Both cases, deliberately. Every other command this backend sends works in
|
||||
// lower case, but the meters stayed silent on a real SunSDR through two
|
||||
// rounds of fixes — and the protocol document's own examples are upper case
|
||||
// (TX_SENSORS_ENABLE:true,200;). A server that is case-insensitive ignores
|
||||
// the duplicate; one that is not finally hears the subscription.
|
||||
e1 := t.send("rx_sensors_enable:true,200;")
|
||||
e2 := t.send("tx_sensors_enable:true,200;")
|
||||
debugLog.Printf("TCI: sensor subscription sent (%s): rx=%v tx=%v", when, e1, e2)
|
||||
_ = t.send("RX_SENSORS_ENABLE:true,200;")
|
||||
_ = t.send("TX_SENSORS_ENABLE:true,200;")
|
||||
debugLog.Printf("TCI: sensor subscription sent (%s, both cases): rx=%v tx=%v", when, e1, e2)
|
||||
}
|
||||
|
||||
func (t *TCI) send(cmd string) error {
|
||||
|
||||
Reference in New Issue
Block a user