not1mm 24.4.25__py3-none-any.whl → 24.4.25.1__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
@@ -42,7 +42,6 @@ from PyQt6.QtGui import QFontDatabase, QColorConstants
42
42
  from PyQt6.QtWidgets import QFileDialog
43
43
 
44
44
  from not1mm.lib.about import About
45
- from not1mm.lib.cat_interface import CAT
46
45
  from not1mm.lib.cwinterface import CW
47
46
  from not1mm.lib.database import DataBase
48
47
  from not1mm.lib.edit_macro import EditMacro
@@ -3197,9 +3196,12 @@ class MainWindow(QtWidgets.QMainWindow):
3197
3196
  destination_file.write_bytes(child.read_bytes())
3198
3197
 
3199
3198
  def poll_radio(self, the_dict):
3200
- """catch"""
3199
+ """
3200
+ Gets called by thread worker radio.py
3201
+ Passing in a dictionary object with the
3202
+ vfo freq, mode, bandwidth, and online state of the radio.
3203
+ """
3201
3204
  self.set_radio_icon(0)
3202
- print(f"{the_dict=}")
3203
3205
  info_dirty = False
3204
3206
  vfo = the_dict.get("vfoa", "")
3205
3207
  mode = the_dict.get("mode", "")
@@ -3211,52 +3213,52 @@ class MainWindow(QtWidgets.QMainWindow):
3211
3213
  else:
3212
3214
  self.set_radio_icon(2)
3213
3215
 
3214
- if mode == "CW":
3215
- self.setmode(mode)
3216
- if mode == "LSB" or mode == "USB":
3217
- self.setmode("SSB")
3218
- if mode == "RTTY":
3219
- self.setmode("RTTY")
3216
+ if vfo == "":
3217
+ return
3218
+ if self.radio_state.get("vfoa") != vfo:
3219
+ info_dirty = True
3220
+ self.radio_state["vfoa"] = vfo
3221
+ band = getband(str(vfo))
3222
+ self.radio_state["band"] = band
3223
+ self.contact["Band"] = get_logged_band(str(vfo))
3224
+ self.set_band_indicator(band)
3220
3225
 
3221
- if vfo == "":
3222
- return
3223
- if self.radio_state.get("vfoa") != vfo:
3224
- info_dirty = True
3225
- self.radio_state["vfoa"] = vfo
3226
- band = getband(str(vfo))
3227
- self.radio_state["band"] = band
3228
- self.contact["Band"] = get_logged_band(str(vfo))
3229
- self.set_band_indicator(band)
3226
+ if self.radio_state.get("mode") != mode:
3227
+ info_dirty = True
3228
+ self.radio_state["mode"] = mode
3230
3229
 
3231
- if self.radio_state.get("mode") != mode:
3232
- info_dirty = True
3233
- self.radio_state["mode"] = mode
3230
+ if self.radio_state.get("bw") != bw:
3231
+ info_dirty = True
3232
+ self.radio_state["bw"] = bw
3234
3233
 
3235
- if self.radio_state.get("bw") != bw:
3236
- info_dirty = True
3237
- self.radio_state["bw"] = bw
3234
+ if mode == "CW":
3235
+ self.setmode(mode)
3236
+ if mode == "LSB" or mode == "USB":
3237
+ self.setmode("SSB")
3238
+ if mode == "RTTY":
3239
+ self.setmode("RTTY")
3238
3240
 
3239
- if info_dirty:
3240
- logger.debug("VFO: %s MODE: %s BW: %s", vfo, mode, bw)
3241
- self.set_window_title()
3242
- cmd = {}
3243
- cmd["cmd"] = "RADIO_STATE"
3244
- cmd["station"] = platform.node()
3245
- cmd["band"] = band
3246
- cmd["vfoa"] = vfo
3247
- cmd["mode"] = mode
3248
- cmd["bw"] = bw
3249
- self.multicast_interface.send_as_json(cmd)
3250
- if self.n1mm:
3251
- if self.n1mm.send_radio_packets:
3252
- self.n1mm.radio_info["Freq"] = vfo[:-1]
3253
- self.n1mm.radio_info["TXFreq"] = vfo[:-1]
3254
- self.n1mm.radio_info["Mode"] = mode
3255
- self.n1mm.radio_info["OpCall"] = self.current_op
3256
- self.n1mm.radio_info["IsRunning"] = str(
3257
- self.pref.get("run_state", False)
3258
- )
3259
- self.n1mm.send_radio()
3241
+ if info_dirty:
3242
+ logger.debug("VFO: %s MODE: %s BW: %s", vfo, mode, bw)
3243
+ self.set_window_title()
3244
+ cmd = {}
3245
+ cmd["cmd"] = "RADIO_STATE"
3246
+ cmd["station"] = platform.node()
3247
+ cmd["band"] = band
3248
+ cmd["vfoa"] = vfo
3249
+ cmd["mode"] = mode
3250
+ cmd["bw"] = bw
3251
+ self.multicast_interface.send_as_json(cmd)
3252
+ if self.n1mm:
3253
+ if self.n1mm.send_radio_packets:
3254
+ self.n1mm.radio_info["Freq"] = vfo[:-1]
3255
+ self.n1mm.radio_info["TXFreq"] = vfo[:-1]
3256
+ self.n1mm.radio_info["Mode"] = mode
3257
+ self.n1mm.radio_info["OpCall"] = self.current_op
3258
+ self.n1mm.radio_info["IsRunning"] = str(
3259
+ self.pref.get("run_state", False)
3260
+ )
3261
+ self.n1mm.send_radio()
3260
3262
 
3261
3263
  def edit_cw_macros(self) -> None:
3262
3264
  """
not1mm/lib/version.py CHANGED
@@ -1,3 +1,3 @@
1
1
  """It's the version"""
2
2
 
3
- __version__ = "24.4.25"
3
+ __version__ = "24.4.25.1"
not1mm/radio.py CHANGED
@@ -24,7 +24,7 @@ class Radio(QObject):
24
24
  vfoa = "14030000"
25
25
  mode = "CW"
26
26
  bw = "500"
27
- delta = 10
27
+ delta = 1
28
28
  poll_time = datetime.datetime.now() + datetime.timedelta(seconds=delta)
29
29
  time_to_quit = False
30
30
  online = False
@@ -76,11 +76,27 @@ class Radio(QObject):
76
76
  if self.cat:
77
77
  self.cat.set_vfo(vfo)
78
78
  self.vfoa = vfo
79
+ self.poll_callback.emit(
80
+ {
81
+ "vfoa": self.vfoa,
82
+ "mode": self.mode,
83
+ "bw": self.bw,
84
+ "online": self.online,
85
+ }
86
+ )
79
87
 
80
88
  def set_mode(self, mode):
81
89
  if self.cat:
82
90
  self.cat.set_mode(mode)
83
91
  self.mode = mode
92
+ self.poll_callback.emit(
93
+ {
94
+ "vfoa": self.vfoa,
95
+ "mode": self.mode,
96
+ "bw": self.bw,
97
+ "online": self.online,
98
+ }
99
+ )
84
100
 
85
101
  def ptt_on(self):
86
102
  if self.cat:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: not1mm
3
- Version: 24.4.25
3
+ Version: 24.4.25.1
4
4
  Summary: NOT1MM Logger
5
5
  Author-email: Michael Bridak <michael.bridak@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/mbridak/not1mm
@@ -177,6 +177,7 @@ I wish to thank those who've contributed to the project.
177
177
 
178
178
  ## Recent Changes
179
179
 
180
+ - [24-4-25-1] Reduce delta time to poll. Reorder poll_radio callback. Remove unused CAT lib from main.
180
181
  - [24-4-25] Limited loop in radio.py, reducing clock cycles used. Moved Log window to the top of the logger.
181
182
  - [24-4-24] Placed CAT control into a thread so disconnecting the radio wouldn't lock up the interface.
182
183
  - [24-4-17] Trap OSError if no sound device. Stop fsutils/appdata from creating useless .not1mm and .username folder structures on Linux platforms.
@@ -1,10 +1,10 @@
1
1
  not1mm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- not1mm/__main__.py,sha256=vibAr-GKlew4WptbUyv68USYEZYYKJfWOtqtI-HtG50,123590
2
+ not1mm/__main__.py,sha256=TPnGFy4UQkvMBpjW1xyK1iPUNrj16nIAA6SS6IP5yF0,123515
3
3
  not1mm/bandmap.py,sha256=3kmRYItrBqpjudFb2NnkGNJpDWkwOpGPQbKwHmYnQ-o,34021
4
4
  not1mm/checkwindow.py,sha256=9ueFgYLM4RFmroMJBXXn98XWO9ZJ-Dop6MwZUXRNFF0,10577
5
5
  not1mm/fsutils.py,sha256=ukHKxKTeNKxKwqRaJjtzRShL4X5Xl0jRBbADyy3Ifp8,1701
6
6
  not1mm/logwindow.py,sha256=UcO8mgs_E7ier2gg_1ESTaRxABEvcpCwKmSibm7hl74,44603
7
- not1mm/radio.py,sha256=Ogx91IaXHaNi_FOwTl092CKuwCnxPoAv46BYwOFwYuM,2455
7
+ not1mm/radio.py,sha256=im14hFLKu0NreymcYoeSE3gyFHoXygP8azY0nsfBLP0,2876
8
8
  not1mm/vfo.py,sha256=pRRj0XTbeTU9noo3nC1dbg26VYj6gHEw_srUDbyYqC0,12169
9
9
  not1mm/data/JetBrainsMono-Regular.ttf,sha256=UOHctAKY_PzCGh7zy-6f6egnCcSK0wzmF0csBqO9lDY,203952
10
10
  not1mm/data/MASTER.SCP,sha256=1vQRvEZ865brfmmajp-Lj-hgWejVGI992q8o971bUV8,366478
@@ -106,7 +106,7 @@ not1mm/lib/plugin_common.py,sha256=AAKBPCXzTWZJb-h08uPNnHVG7bSCg7kwukc211gFivY,8
106
106
  not1mm/lib/select_contest.py,sha256=WsptLuwkouIHeocJL3oZ6-eUfEnhpwdc-x7eMZ_TIVM,359
107
107
  not1mm/lib/settings.py,sha256=i4Za_BZDl9UotB10o8sjIkzRdR0493rMI5VaQltUZHA,9054
108
108
  not1mm/lib/super_check_partial.py,sha256=p5l3u2ZOCBtlWgbvskC50FpuoaIpR07tfC6zTdRWbh4,2334
109
- not1mm/lib/version.py,sha256=vLGpVgRyNj9a1k1m6VNjfOXZZ20THSg5rUJKnmCLD5k,48
109
+ not1mm/lib/version.py,sha256=5VfzMqJpSG9cTllQxeEteOeBs_mZEETIMigeCC1OoCI,50
110
110
  not1mm/lib/versiontest.py,sha256=8vDNptuBBunn-1IGkjNaquehqBYUJyjrPSF8Igmd4_Y,1286
111
111
  not1mm/plugins/10_10_fall_cw.py,sha256=fUjfwjuscDjicXIxsO0JHh7xTR9Vu0iPsrOLb896Qak,10873
112
112
  not1mm/plugins/10_10_spring_cw.py,sha256=WNaJP5mBQfaB6SxnFI0Vawt3AKDr94tKVtAK-EVhtUY,10878
@@ -140,9 +140,9 @@ not1mm/plugins/naqp_ssb.py,sha256=IWksulcb2_DxlkeW0h3048t8I-u00G_67KBVKkp-TV4,11
140
140
  not1mm/plugins/phone_weekly_test.py,sha256=gCX0ESUoiQzDp9puwibt9-dRembNsiuEeBdawCVvjHA,12316
141
141
  not1mm/plugins/stew_perry_topband.py,sha256=DIMI3mGMKokXXb9pPLqdhBI6JVnnIs7ZnAL23nFmshE,10588
142
142
  not1mm/plugins/winter_field_day.py,sha256=4rcfRtobwjHO6BNL3WOTHzBmyyeuX79BNGBG8PfjrI8,10238
143
- not1mm-24.4.25.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
144
- not1mm-24.4.25.dist-info/METADATA,sha256=y3FM7gsZvD6_ZVhIOBSt0l-_jhSwZHB6Oy66webo0J0,27786
145
- not1mm-24.4.25.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
146
- not1mm-24.4.25.dist-info/entry_points.txt,sha256=pMcZk_0dxFgLkcUkF0Q874ojpwOmF3OL6EKw9LgvocM,47
147
- not1mm-24.4.25.dist-info/top_level.txt,sha256=0YmTxEcDzQlzXub-lXASvoLpg_mt1c2thb5cVkDf5J4,7
148
- not1mm-24.4.25.dist-info/RECORD,,
143
+ not1mm-24.4.25.1.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
144
+ not1mm-24.4.25.1.dist-info/METADATA,sha256=BSMf_2zOxDbDk8E4rgSG9kr8X6itsdP00ZY8KEIxGgo,27891
145
+ not1mm-24.4.25.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
146
+ not1mm-24.4.25.1.dist-info/entry_points.txt,sha256=pMcZk_0dxFgLkcUkF0Q874ojpwOmF3OL6EKw9LgvocM,47
147
+ not1mm-24.4.25.1.dist-info/top_level.txt,sha256=0YmTxEcDzQlzXub-lXASvoLpg_mt1c2thb5cVkDf5J4,7
148
+ not1mm-24.4.25.1.dist-info/RECORD,,