don't send native deletions

This commit is contained in:
Jakob Ketterl 2021-05-03 19:28:03 +02:00
parent d9fe604171
commit 041e8930bf

View File

@ -1,5 +1,6 @@
from owrx.source import SdrSource, SdrDeviceDescription from owrx.source import SdrSource, SdrDeviceDescription
from owrx.socket import getAvailablePort from owrx.socket import getAvailablePort
from owrx.property import PropertyDeleted
import socket import socket
from owrx.command import Flag, Option from owrx.command import Flag, Option
from typing import List from typing import List
@ -37,6 +38,8 @@ class ConnectorSource(SdrSource):
def sendControlMessage(self, changes): def sendControlMessage(self, changes):
for prop, value in changes.items(): for prop, value in changes.items():
if value is PropertyDeleted:
value = None
logger.debug("sending property change over control socket: {0} changed to {1}".format(prop, value)) logger.debug("sending property change over control socket: {0} changed to {1}".format(prop, value))
self.controlSocket.sendall("{prop}:{value}\n".format(prop=prop, value=value).encode()) self.controlSocket.sendall("{prop}:{value}\n".format(prop=prop, value=value).encode())