1
0

structured callsign data

Este cometimento está contido em:
Jakob Ketterl
2022-11-30 01:07:16 +01:00
ascendente 975f5ffdf0
cometimento 258e41669e
9 ficheiros modificados com 130 adições e 94 eliminações

Ver ficheiro

@@ -56,7 +56,7 @@ class PskReporter(Reporter):
self.timer.start()
def spotEquals(self, s1, s2):
keys = ["callsign", "timestamp", "locator", "mode", "msg"]
keys = ["source", "timestamp", "locator", "mode", "msg"]
return reduce(and_, map(lambda key: s1[key] == s2[key], keys))
@@ -141,7 +141,7 @@ class Uploader(object):
def encodeSpot(self, spot):
try:
return bytes(
self.encodeString(spot["callsign"])
self.encodeString(spot["source"]["callsign"])
+ list(int(spot["freq"]).to_bytes(4, "big"))
+ list(int(spot["db"]).to_bytes(1, "big", signed=True))
+ self.encodeString(spot["mode"])

Ver ficheiro

@@ -56,7 +56,7 @@ class Worker(threading.Thread):
# FST4W does not have drift
"drift": spot["drift"] if "drift" in spot else 0,
"tqrg": spot["freq"] / 1e6,
"tcall": spot["callsign"],
"tcall": spot["source"]["callsign"],
"tgrid": spot["locator"],
"dbm": spot["dbm"],
"version": openwebrx_version,