not1mm 24.6.1__py3-none-any.whl → 24.7.13__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
not1mm/__main__.py CHANGED
@@ -2863,7 +2863,7 @@ class MainWindow(QtWidgets.QMainWindow):
2863
2863
  None
2864
2864
  """
2865
2865
 
2866
- if mode == "CW":
2866
+ if mode in ("CW", "CW-U", "CW-L"):
2867
2867
  self.setmode("CW")
2868
2868
  self.radio_state["mode"] = "CW"
2869
2869
  if self.rig_control:
@@ -3015,7 +3015,7 @@ class MainWindow(QtWidgets.QMainWindow):
3015
3015
 
3016
3016
  def setmode(self, mode: str) -> None:
3017
3017
  """Call when the mode changes."""
3018
- if mode == "CW":
3018
+ if mode in ("CW", "CW-U", "CW-L"):
3019
3019
  if self.current_mode != "CW":
3020
3020
  self.current_mode = "CW"
3021
3021
  self.sent.setText("599")
@@ -3032,7 +3032,7 @@ class MainWindow(QtWidgets.QMainWindow):
3032
3032
  self.receive.setText("59")
3033
3033
  self.read_cw_macros()
3034
3034
  return
3035
- if mode == "RTTY":
3035
+ if mode in ("RTTY", "DIGI-U", "DIGI-L"):
3036
3036
  if self.current_mode != "RTTY":
3037
3037
  self.current_mode = "RTTY"
3038
3038
  self.sent.setText("59")
@@ -3145,7 +3145,7 @@ class MainWindow(QtWidgets.QMainWindow):
3145
3145
  info_dirty = True
3146
3146
  self.radio_state["bw"] = bw
3147
3147
 
3148
- if mode == "CW":
3148
+ if mode in ("CW", "CW-U", "CW-L"):
3149
3149
  self.setmode(mode)
3150
3150
  if mode == "LSB" or mode == "USB":
3151
3151
  self.setmode("SSB")
@@ -3153,26 +3153,29 @@ class MainWindow(QtWidgets.QMainWindow):
3153
3153
  self.setmode("RTTY")
3154
3154
 
3155
3155
  if info_dirty:
3156
- logger.debug("VFO: %s MODE: %s BW: %s", vfo, mode, bw)
3157
- self.set_window_title()
3158
- cmd = {}
3159
- cmd["cmd"] = "RADIO_STATE"
3160
- cmd["station"] = platform.node()
3161
- cmd["band"] = band
3162
- cmd["vfoa"] = vfo
3163
- cmd["mode"] = mode
3164
- cmd["bw"] = bw
3165
- self.multicast_interface.send_as_json(cmd)
3166
- if self.n1mm:
3167
- if self.n1mm.send_radio_packets:
3168
- self.n1mm.radio_info["Freq"] = vfo[:-1]
3169
- self.n1mm.radio_info["TXFreq"] = vfo[:-1]
3170
- self.n1mm.radio_info["Mode"] = mode
3171
- self.n1mm.radio_info["OpCall"] = self.current_op
3172
- self.n1mm.radio_info["IsRunning"] = str(
3173
- self.pref.get("run_state", False)
3174
- )
3175
- self.n1mm.send_radio()
3156
+ try:
3157
+ logger.debug("VFO: %s MODE: %s BW: %s", vfo, mode, bw)
3158
+ self.set_window_title()
3159
+ cmd = {}
3160
+ cmd["cmd"] = "RADIO_STATE"
3161
+ cmd["station"] = platform.node()
3162
+ cmd["band"] = band
3163
+ cmd["vfoa"] = vfo
3164
+ cmd["mode"] = mode
3165
+ cmd["bw"] = bw
3166
+ self.multicast_interface.send_as_json(cmd)
3167
+ if self.n1mm:
3168
+ if self.n1mm.send_radio_packets:
3169
+ self.n1mm.radio_info["Freq"] = vfo[:-1]
3170
+ self.n1mm.radio_info["TXFreq"] = vfo[:-1]
3171
+ self.n1mm.radio_info["Mode"] = mode
3172
+ self.n1mm.radio_info["OpCall"] = self.current_op
3173
+ self.n1mm.radio_info["IsRunning"] = str(
3174
+ self.pref.get("run_state", False)
3175
+ )
3176
+ self.n1mm.send_radio()
3177
+ except TypeError as err:
3178
+ logger.debug(f"{err=} {vfo=} {the_dict=}")
3176
3179
 
3177
3180
  def edit_cw_macros(self) -> None:
3178
3181
  """