not1mm 24.7.25__py3-none-any.whl → 24.7.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/lib/version.py +1 -1
- not1mm/vfo.py +21 -4
- {not1mm-24.7.25.dist-info → not1mm-24.7.25.1.dist-info}/METADATA +2 -1
- {not1mm-24.7.25.dist-info → not1mm-24.7.25.1.dist-info}/RECORD +8 -8
- {not1mm-24.7.25.dist-info → not1mm-24.7.25.1.dist-info}/LICENSE +0 -0
- {not1mm-24.7.25.dist-info → not1mm-24.7.25.1.dist-info}/WHEEL +0 -0
- {not1mm-24.7.25.dist-info → not1mm-24.7.25.1.dist-info}/entry_points.txt +0 -0
- {not1mm-24.7.25.dist-info → not1mm-24.7.25.1.dist-info}/top_level.txt +0 -0
not1mm/lib/version.py
CHANGED
not1mm/vfo.py
CHANGED
@@ -39,6 +39,7 @@ class VfoWindow(QDockWidget):
|
|
39
39
|
message_shown = False
|
40
40
|
multicast_interface = None
|
41
41
|
current_palette = None
|
42
|
+
device_reconnect = False
|
42
43
|
|
43
44
|
def __init__(self):
|
44
45
|
super().__init__()
|
@@ -64,6 +65,7 @@ class VfoWindow(QDockWidget):
|
|
64
65
|
self.poll_rig_timer = QtCore.QTimer()
|
65
66
|
self.poll_rig_timer.timeout.connect(self.poll_radio)
|
66
67
|
self.poll_rig_timer.start(500)
|
68
|
+
self.visibilityChanged.connect(self.window_state_changed)
|
67
69
|
|
68
70
|
def setDarkMode(self, dark: bool) -> None:
|
69
71
|
"""Forces a darkmode palette."""
|
@@ -178,27 +180,37 @@ class VfoWindow(QDockWidget):
|
|
178
180
|
if "vfoknob" in data.decode().strip():
|
179
181
|
return device
|
180
182
|
|
181
|
-
def
|
183
|
+
def window_state_changed(self):
|
184
|
+
"""Setup vfo knob if window is toggled on"""
|
185
|
+
|
186
|
+
if self.isVisible():
|
187
|
+
self.setup_serial()
|
188
|
+
|
189
|
+
def setup_serial(self, supress_msg=False) -> None:
|
182
190
|
"""
|
183
191
|
Setup the device returned by discover_device()
|
184
192
|
Or display message saying we didn't find one.
|
185
193
|
"""
|
186
194
|
|
195
|
+
if not self.isVisible():
|
196
|
+
return
|
197
|
+
|
187
198
|
device = self.discover_device()
|
188
199
|
if device:
|
189
200
|
try:
|
190
201
|
self.pico = serial.Serial("/dev/serial/by-id/" + device, 115200)
|
191
202
|
self.pico.timeout = 100
|
192
203
|
self.lcdNumber.setStyleSheet("QLCDNumber { color: white; }")
|
204
|
+
self.device_reconnect = True
|
193
205
|
except OSError:
|
194
|
-
if self.message_shown is False:
|
206
|
+
if self.message_shown is False and supress_msg is False:
|
195
207
|
self.message_shown = True
|
196
208
|
self.show_message_box(
|
197
209
|
"Unable to locate or open the VFO knob serial device."
|
198
210
|
)
|
199
211
|
self.lcdNumber.setStyleSheet("QLCDNumber { color: red; }")
|
200
212
|
else:
|
201
|
-
if self.message_shown is False:
|
213
|
+
if self.message_shown is False and supress_msg is False:
|
202
214
|
self.message_shown = True
|
203
215
|
self.show_message_box(
|
204
216
|
"Unable to locate or open the VFO knob serial device."
|
@@ -269,13 +281,14 @@ class VfoWindow(QDockWidget):
|
|
269
281
|
return
|
270
282
|
if vfo < 1700000 or vfo > 60000000:
|
271
283
|
return
|
272
|
-
if vfo != self.old_vfo:
|
284
|
+
if vfo != self.old_vfo or self.device_reconnect is True:
|
273
285
|
self.old_vfo = vfo
|
274
286
|
logger.debug(f"{vfo}")
|
275
287
|
self.showNumber(vfo)
|
276
288
|
# self.lcdNumber.display(dnum)
|
277
289
|
# app.processEvents()
|
278
290
|
cmd = f"F {vfo}\r"
|
291
|
+
self.device_reconnect = False
|
279
292
|
try:
|
280
293
|
if self.pico:
|
281
294
|
self.pico.write(cmd.encode())
|
@@ -302,10 +315,14 @@ class VfoWindow(QDockWidget):
|
|
302
315
|
self.showNumber(result)
|
303
316
|
# self.lcdNumber.display(result)
|
304
317
|
# app.processEvents()
|
318
|
+
else:
|
319
|
+
self.setup_serial(supress_msg=True)
|
305
320
|
except OSError:
|
306
321
|
logger.critical("Unable to write to serial device.")
|
322
|
+
self.pico = None
|
307
323
|
except AttributeError:
|
308
324
|
logger.critical("Unable to write to serial device.")
|
325
|
+
self.pico = None
|
309
326
|
# app.processEvents()
|
310
327
|
|
311
328
|
def show_message_box(self, message: str) -> None:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: not1mm
|
3
|
-
Version: 24.7.25
|
3
|
+
Version: 24.7.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
|
@@ -223,6 +223,7 @@ generated, 'cause I'm lazy, list of those who've submitted PR's.
|
|
223
223
|
|
224
224
|
## Recent Changes
|
225
225
|
|
226
|
+
- [24-7-25-1] Have VFO dock widget handle disconnect/reconnect events of the USB VFO knob more gracefully.
|
226
227
|
- [24-7-25] Updated application categories for the desktop file.
|
227
228
|
- [24-7-25] Maybe let flrig send CW... Probably not.
|
228
229
|
- [24-7-19] Use Qt's QSettings to store window and dockwidgets states.
|
@@ -6,7 +6,7 @@ not1mm/fsutils.py,sha256=ukHKxKTeNKxKwqRaJjtzRShL4X5Xl0jRBbADyy3Ifp8,1701
|
|
6
6
|
not1mm/logwindow.py,sha256=pwhiwolmGnW01LF4sjlu3ywLsgfxL6KuGuKuYKYmgeY,44403
|
7
7
|
not1mm/playsoundtest.py,sha256=_kvvOfgs-u-H4kVSiSlnDtn9HWv0RiJQybkv24CEngc,464
|
8
8
|
not1mm/radio.py,sha256=eiB04LPMPBeMrBRI021Z7VXth66EOYb0Ujh11T9877c,3362
|
9
|
-
not1mm/vfo.py,sha256=
|
9
|
+
not1mm/vfo.py,sha256=ZJYJHMUrvAWX_c4xXDOuxkbE9sFuF8THoqJXaz0e_AU,12663
|
10
10
|
not1mm/voice_keying.py,sha256=fkexCCwWcZsXxYVAk0QGcpGbLjbS10ToxWtdKihIVM4,3152
|
11
11
|
not1mm/data/JetBrainsMono-Regular.ttf,sha256=UOHctAKY_PzCGh7zy-6f6egnCcSK0wzmF0csBqO9lDY,203952
|
12
12
|
not1mm/data/MASTER.SCP,sha256=CEjRJNnjBZJlhCi3UFS1qCVMjDqQwhlfk0yZ_os6myI,366153
|
@@ -109,7 +109,7 @@ not1mm/lib/plugin_common.py,sha256=AAKBPCXzTWZJb-h08uPNnHVG7bSCg7kwukc211gFivY,8
|
|
109
109
|
not1mm/lib/select_contest.py,sha256=WsptLuwkouIHeocJL3oZ6-eUfEnhpwdc-x7eMZ_TIVM,359
|
110
110
|
not1mm/lib/settings.py,sha256=MWiKXbasaFbzeHTjfzTaTqbCBrIijudP_-0a5jNmUAA,9265
|
111
111
|
not1mm/lib/super_check_partial.py,sha256=p5l3u2ZOCBtlWgbvskC50FpuoaIpR07tfC6zTdRWbh4,2334
|
112
|
-
not1mm/lib/version.py,sha256=
|
112
|
+
not1mm/lib/version.py,sha256=vCCHd-NGTIRQF1HQqLA4TFjkjFR_ZtwCDpkOE8lTF1M,50
|
113
113
|
not1mm/lib/versiontest.py,sha256=8vDNptuBBunn-1IGkjNaquehqBYUJyjrPSF8Igmd4_Y,1286
|
114
114
|
not1mm/plugins/10_10_fall_cw.py,sha256=IttjX1yy4nDdACGsiYlPteFG8eVseX_WtoFio6bqHE8,10953
|
115
115
|
not1mm/plugins/10_10_spring_cw.py,sha256=ThCptdM3dX4ywhoy2JRcOEyHSqcJolFaT7O_PYzM1Mg,10958
|
@@ -145,9 +145,9 @@ not1mm/plugins/naqp_ssb.py,sha256=VLWVrSzI0UP1AhSXYn61eZ7or1rz6a_pS_xCKfgS4Jw,11
|
|
145
145
|
not1mm/plugins/phone_weekly_test.py,sha256=fLpMe03WB9_KgRl6vMgQQt_aktFdqfNt2Sw81CTRAUs,12325
|
146
146
|
not1mm/plugins/stew_perry_topband.py,sha256=CKBQbYl4ETxhXJd2dma4fg_C5pag_s7Nf61SCztZtqE,10668
|
147
147
|
not1mm/plugins/winter_field_day.py,sha256=4rcfRtobwjHO6BNL3WOTHzBmyyeuX79BNGBG8PfjrI8,10238
|
148
|
-
not1mm-24.7.25.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
149
|
-
not1mm-24.7.25.dist-info/METADATA,sha256=
|
150
|
-
not1mm-24.7.25.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
|
151
|
-
not1mm-24.7.25.dist-info/entry_points.txt,sha256=pMcZk_0dxFgLkcUkF0Q874ojpwOmF3OL6EKw9LgvocM,47
|
152
|
-
not1mm-24.7.25.dist-info/top_level.txt,sha256=0YmTxEcDzQlzXub-lXASvoLpg_mt1c2thb5cVkDf5J4,7
|
153
|
-
not1mm-24.7.25.dist-info/RECORD,,
|
148
|
+
not1mm-24.7.25.1.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
149
|
+
not1mm-24.7.25.1.dist-info/METADATA,sha256=F72Ht3kFbVRg_dd4Y24UagfXACEBvjkEvrQO9ScxBRU,29413
|
150
|
+
not1mm-24.7.25.1.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
|
151
|
+
not1mm-24.7.25.1.dist-info/entry_points.txt,sha256=pMcZk_0dxFgLkcUkF0Q874ojpwOmF3OL6EKw9LgvocM,47
|
152
|
+
not1mm-24.7.25.1.dist-info/top_level.txt,sha256=0YmTxEcDzQlzXub-lXASvoLpg_mt1c2thb5cVkDf5J4,7
|
153
|
+
not1mm-24.7.25.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|