diff --git a/fdlogger/__main__.py b/fdlogger/__main__.py index d34d33a..3d2b232 100644 --- a/fdlogger/__main__.py +++ b/fdlogger/__main__.py @@ -964,6 +964,8 @@ def fakefreq(self, band, mode): """ logger.info("fakefreq: band:%s mode:%s", band, mode) modes = {"CW": 0, "DI": 1, "PH": 2, "FT8": 1, "SSB": 2} + if not band: + return 0 freqtoreturn = self.fakefreqs[band][modes[mode]] logger.info("fakefreq: returning:%s", freqtoreturn) return freqtoreturn @@ -1041,7 +1043,10 @@ def poll_radio(self): self.oldfreq = newfreq self.set_fakefreq(int(newfreq)) self.oldmode = newmode - self.setband(str(self.getband(newfreq))) + if self.getband(newfreq) == 0: + self.setband(str(self.getband(oldfreq))) + else: + self.setband(str(self.getband(newfreq))) self.setmode(str(self.getmode(newmode))) self.radio_icon.setPixmap(self.radio_green) if self.preference.get("send_n1mm_packets"):