Skip to content

Commit 5b0fef9

Browse files
committed
Use fake freequencies if the radio is connected but oldfreq is 0 for N1MM UDP message
1 parent 1c977e6 commit 5b0fef9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

fdlogger/__main__.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1660,8 +1660,13 @@ def log_contact(self):
16601660
logger.warning("%s", err)
16611661

16621662
if self.preference.get("send_n1mm_packets"):
1663-
self.n1mm.contact_info["rxfreq"] = str(self.oldfreq)[:-1]
1664-
self.n1mm.contact_info["txfreq"] = str(self.oldfreq)[:-1]
1663+
if self.oldfreq == 0:
1664+
self.n1mm.contact_info["rxfreq"] = str(self.fakefreq(self.band, self.mode))
1665+
self.n1mm.contact_info["txfreq"] = str(self.fakefreq(self.band, self.mode))
1666+
else:
1667+
self.n1mm.contact_info["rxfreq"] = str(self.oldfreq)[:-1]
1668+
self.n1mm.contact_info["txfreq"] = str(self.oldfreq)[:-1]
1669+
16651670
self.n1mm.contact_info["mode"] = self.oldmode
16661671
if self.oldmode in ("CW", "DG"):
16671672
self.n1mm.contact_info["points"] = "2"

0 commit comments

Comments
 (0)