diff --git a/fdlogger/__main__.py b/fdlogger/__main__.py index a7f8242..a2f0a5f 100644 --- a/fdlogger/__main__.py +++ b/fdlogger/__main__.py @@ -1066,6 +1066,7 @@ def poll_radio(self): else: logger.info("cat_control %s", self.cat_control) self.radio_icon.setPixmap(QtGui.QPixmap(self.radio_grey)) + self.oldmode = self.mode # Set so the UDP packet sends mode when no radio connected - NY4I def flash(self): """Flash the screen""" @@ -1661,14 +1662,19 @@ def log_contact(self): logger.warning("%s", err) if self.preference.get("send_n1mm_packets"): - self.n1mm.contact_info["rxfreq"] = str(self.oldfreq)[:-1] - self.n1mm.contact_info["txfreq"] = str(self.oldfreq)[:-1] + if self.oldfreq == 0: + self.n1mm.contact_info["rxfreq"] = str(self.fakefreq(self.band, self.mode)) + self.n1mm.contact_info["txfreq"] = str(self.fakefreq(self.band, self.mode)) + else: + self.n1mm.contact_info["rxfreq"] = str(self.oldfreq)[:-1] + self.n1mm.contact_info["txfreq"] = str(self.oldfreq)[:-1] + self.n1mm.contact_info["mode"] = self.oldmode if self.oldmode in ("CW", "DG"): self.n1mm.contact_info["points"] = "2" else: self.n1mm.contact_info["points"] = "1" - self.n1mm.contact_info["band"] = self.band + self.n1mm.contact_info["band"] = self.n1mm.bandToUDPBand[self.band] self.n1mm.contact_info["mycall"] = self.preference.get("mycall") self.n1mm.contact_info["IsRunQSO"] = str(self.run_state) self.n1mm.contact_info["timestamp"] = datetime.now( diff --git a/fdlogger/lib/n1mm.py b/fdlogger/lib/n1mm.py index d8b2c54..62796f0 100644 --- a/fdlogger/lib/n1mm.py +++ b/fdlogger/lib/n1mm.py @@ -99,6 +99,20 @@ class N1MM: "StationName": "", "ID": "", } + + bandToUDPBand = { + "160" : "1.8", + "80" : "3.5", + "40" : "7", + "20" : "14", + "15" : "21", + "10" : "28", + "6" : "50", + "2" : "144", + "222" : "222", + "432" : "420", + "SAT" : "144", # The fakefreqs are 2m so I picked 2m for SAT - NY4I + } def __init__( self,