@@ -108,6 +108,32 @@ def test_parse_telemetry_config_eqns(self):
108108 self .assertIsInstance (result ['tEQNS' ], list )
109109 self .assertEqual (len (result ['tEQNS' ]), 5 )
110110
111+ def test_parse_telemetry_config_eqns_with_spaces (self ):
112+ """Test EQNS telemetry config with spaces after commas (real-world packet)"""
113+ packet = "IZ6RND>IESPX,TCPIP*,qAC,T2NL::IZ6RND :EQNS.0,0.392,-20, 0,0.235,0, 0,0.1,0, 0,1,0, 0,1,0"
114+ result = parse (packet )
115+
116+ self .assertEqual (result ['format' ], 'telemetry-message' )
117+ self .assertIn ('tEQNS' , result )
118+ self .assertIsInstance (result ['tEQNS' ], list )
119+ self .assertEqual (len (result ['tEQNS' ]), 5 )
120+ # Verify the values are correctly parsed (spaces should be stripped)
121+ expected = [[0 , 0.392 , - 20 ], [0 , 0.235 , 0 ], [0 , 0.1 , 0 ], [0 , 1 , 0 ], [0 , 1 , 0 ]]
122+ self .assertEqual (result ['tEQNS' ], expected )
123+
124+ def test_parse_telemetry_config_eqns_with_non_numeric_suffix (self ):
125+ """Test EQNS telemetry config with non-numeric characters in last value (real-world packet)"""
126+ packet = "DB0PBG-5>APMI03,DB0OL-10*,WIDE2-1,qAR,DB0PDF-10::DB0PBG-5 :EQNS.0,0.075,0,0,0.5,-64,0,10,0,0,1,0,0,0,03n"
127+ result = parse (packet )
128+
129+ self .assertEqual (result ['format' ], 'telemetry-message' )
130+ self .assertIn ('tEQNS' , result )
131+ self .assertIsInstance (result ['tEQNS' ], list )
132+ self .assertEqual (len (result ['tEQNS' ]), 5 )
133+ # Verify the values are correctly parsed (03n should be parsed as 3)
134+ expected = [[0 , 0.075 , 0 ], [0 , 0.5 , - 64 ], [0 , 10 , 0 ], [0 , 1 , 0 ], [0 , 0 , 3 ]]
135+ self .assertEqual (result ['tEQNS' ], expected )
136+
111137 def test_bits_without_binary_bits (self ):
112138 """Test BITS telemetry config without binary bits (malformed packet)"""
113139 packet = "E25HML-13>APRS,TCPIP*,qAC,T2PERTH::E25HML-13:BITS.ESP8266 Test WX DHT22 version"
0 commit comments