drop bad signal

This commit is contained in:
2026-03-21 19:26:42 +01:00
parent 44ea0e19c1
commit f163dac13d
+4 -1
View File
@@ -120,6 +120,7 @@ def process_command(tef: AutoFMAM, data: bytes, state: State, conn: socket.socke
if freq < 153 or freq > 108000: continue
mode = TEF6686.TuneTo_Mode.FM_Jump
if tef.modulation == Modulation.AM: mode = TEF6686.TuneTo_Mode.Preset
tef.set_modulation(freq)
match tef.modulation:
case Modulation.FM:
@@ -217,6 +218,8 @@ def send_signal_status(tef: AutoFMAM, conn: socket.socket, state: State):
if ms_since_tune < 45: return # Give only "quality data"
level = level / 10
if level > 120: return
level += 11.25
data = b"S"
@@ -234,7 +237,7 @@ def send_signal_status(tef: AutoFMAM, conn: socket.socket, state: State):
state.last_bw_extend = False
else: data += b"M"
conn.sendall(data + f"{level + 11.25},{wam//10},{usn//10},{bandwidth}\n\n".encode())
conn.sendall(data + f"{level},{wam//10},{usn//10},{bandwidth}\n\n".encode())
@periodic(RDS_UPDATE_INTERVAL)
def send_rds_data(tef: AutoFMAM, conn: socket.socket, state: State):