fix: solve issue with Antenna Genius for remote operations
This commit is contained in:
@@ -3,7 +3,7 @@ package antgenius
|
||||
import "testing"
|
||||
|
||||
func TestHandleAntennaList(t *testing.T) {
|
||||
c := New("x", 9007)
|
||||
c := New("x", 9007, "")
|
||||
// Names may contain spaces — must be captured up to " tx=".
|
||||
c.handleLine("R3|0|antenna 1 name=UB VL2.3 tx=ffff rx=ffff inband=0000")
|
||||
c.handleLine("R3|0|antenna 2 name=DX Commander tx=00ff rx=00ff inband=0000")
|
||||
@@ -20,7 +20,7 @@ func TestHandleAntennaList(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAntennaUnderscoreAndPlaceholder(t *testing.T) {
|
||||
c := New("x", 9007)
|
||||
c := New("x", 9007, "")
|
||||
c.handleLine("R3|0|antenna 1 name=Hex_Beam tx=ffff rx=ffff inband=0000") // underscore → space
|
||||
c.handleLine("R3|0|antenna 4 name=Antenna_4 tx=0000 rx=0000 inband=0000") // default → filtered
|
||||
c.handleLine("R3|0|antenna 5 name=antenna 5 tx=0000 rx=0000 inband=0000") // default → filtered
|
||||
@@ -31,7 +31,7 @@ func TestAntennaUnderscoreAndPlaceholder(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestHandlePortStatus(t *testing.T) {
|
||||
c := New("x", 9007)
|
||||
c := New("x", 9007, "")
|
||||
// Async push after "sub port all": active antenna is txant (fallback rxant).
|
||||
c.handleLine("S0|port 1 source=MANUAL band=6 rxant=2 txant=2 inband=0 inhibit=0")
|
||||
c.handleLine("S0|port 2 source=AUTO band=0 rxant=0 txant=0 inband=0 inhibit=0")
|
||||
@@ -50,7 +50,7 @@ func TestHandlePortStatus(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPortTxFallbackToRx(t *testing.T) {
|
||||
c := New("x", 9007)
|
||||
c := New("x", 9007, "")
|
||||
c.handleLine("S0|port 1 source=MANUAL band=6 rxant=3 txant=0 inband=0 inhibit=0")
|
||||
if st := c.GetStatus(); st.PortA != 3 {
|
||||
t.Errorf("PortA = %d, want 3 (rx fallback when tx=0)", st.PortA)
|
||||
|
||||
Reference in New Issue
Block a user