don't choke on invalid characters

This commit is contained in:
Jakob Ketterl 2020-01-09 13:49:38 +01:00
parent 2bb877a84b
commit f05ac31dc4

View File

@ -277,7 +277,7 @@ class OpenWebRxReceiverClient(Client):
self.send(bytes([0x03]) + data) self.send(bytes([0x03]) + data)
def write_secondary_demod(self, data): def write_secondary_demod(self, data):
message = data.decode("ascii") message = data.decode("ascii", "replace")
self.send({"type": "secondary_demod", "value": message}) self.send({"type": "secondary_demod", "value": message})
def write_secondary_dsp_config(self, cfg): def write_secondary_dsp_config(self, cfg):