not1mm 24.10.19__py3-none-any.whl → 24.10.20__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 +47 -21
- not1mm/lib/cat_interface.py +50 -20
- not1mm/lib/version.py +1 -1
- not1mm/logwindow.py +9 -1
- not1mm/plugins/arrl_dx_cw.py +93 -2
- not1mm/plugins/arrl_dx_ssb.py +93 -2
- not1mm/radio.py +26 -22
- {not1mm-24.10.19.dist-info → not1mm-24.10.20.dist-info}/METADATA +4 -2
- {not1mm-24.10.19.dist-info → not1mm-24.10.20.dist-info}/RECORD +13 -13
- {not1mm-24.10.19.dist-info → not1mm-24.10.20.dist-info}/LICENSE +0 -0
- {not1mm-24.10.19.dist-info → not1mm-24.10.20.dist-info}/WHEEL +0 -0
- {not1mm-24.10.19.dist-info → not1mm-24.10.20.dist-info}/entry_points.txt +0 -0
- {not1mm-24.10.19.dist-info → not1mm-24.10.20.dist-info}/top_level.txt +0 -0
not1mm/__main__.py
CHANGED
@@ -1710,6 +1710,15 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1710
1710
|
self.settings.setValue("windowState", self.saveState())
|
1711
1711
|
self.settings.sync()
|
1712
1712
|
|
1713
|
+
try: # Shutdown the radio thread.
|
1714
|
+
if self.radio_thread.isRunning():
|
1715
|
+
self.rig_control.time_to_quit = True
|
1716
|
+
self.radio_thread.quit()
|
1717
|
+
self.radio_thread.wait(1000)
|
1718
|
+
|
1719
|
+
except (RuntimeError, AttributeError):
|
1720
|
+
...
|
1721
|
+
|
1713
1722
|
cmd = {}
|
1714
1723
|
cmd["cmd"] = "HALT"
|
1715
1724
|
cmd["station"] = platform.node()
|
@@ -2661,7 +2670,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
2661
2670
|
self.rig_control.poll_callback.connect(self.poll_radio)
|
2662
2671
|
self.radio_thread.start()
|
2663
2672
|
|
2664
|
-
|
2673
|
+
elif self.pref.get("userigctld", False):
|
2665
2674
|
logger.debug(
|
2666
2675
|
"Using rigctld: %s",
|
2667
2676
|
f"{self.pref.get('CAT_ip')} {self.pref.get('CAT_port')}",
|
@@ -2676,6 +2685,17 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
2676
2685
|
self.radio_thread.finished.connect(self.rig_control.deleteLater)
|
2677
2686
|
self.rig_control.poll_callback.connect(self.poll_radio)
|
2678
2687
|
self.radio_thread.start()
|
2688
|
+
else:
|
2689
|
+
self.rig_control = Radio(
|
2690
|
+
"fake",
|
2691
|
+
self.pref.get("CAT_ip", "127.0.0.1"),
|
2692
|
+
int(self.pref.get("CAT_port", 0000)),
|
2693
|
+
)
|
2694
|
+
self.rig_control.moveToThread(self.radio_thread)
|
2695
|
+
self.radio_thread.started.connect(self.rig_control.run)
|
2696
|
+
self.radio_thread.finished.connect(self.rig_control.deleteLater)
|
2697
|
+
self.rig_control.poll_callback.connect(self.poll_radio)
|
2698
|
+
self.radio_thread.start()
|
2679
2699
|
|
2680
2700
|
self.cw = None
|
2681
2701
|
if (
|
@@ -3077,17 +3097,18 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
3077
3097
|
self.show_help_dialog()
|
3078
3098
|
self.clearinputs()
|
3079
3099
|
return
|
3080
|
-
if stripped_text == "TEST":
|
3081
|
-
|
3082
|
-
|
3083
|
-
|
3084
|
-
|
3085
|
-
|
3086
|
-
|
3087
|
-
|
3088
|
-
|
3100
|
+
# if stripped_text == "TEST":
|
3101
|
+
# result = self.database.get_calls_and_bands()
|
3102
|
+
# cmd = {}
|
3103
|
+
# cmd["cmd"] = "WORKED"
|
3104
|
+
# cmd["station"] = platform.node()
|
3105
|
+
# cmd["worked"] = result
|
3106
|
+
# self.multicast_interface.send_as_json(cmd)
|
3107
|
+
# self.clearinputs()
|
3108
|
+
# return
|
3089
3109
|
if self.is_floatable(stripped_text):
|
3090
3110
|
self.change_freq(stripped_text)
|
3111
|
+
self.clearinputs()
|
3091
3112
|
return
|
3092
3113
|
|
3093
3114
|
cmd = {}
|
@@ -3125,6 +3146,11 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
3125
3146
|
|
3126
3147
|
vfo = float(stripped_text)
|
3127
3148
|
vfo = int(vfo * 1000)
|
3149
|
+
|
3150
|
+
if self.rig_control:
|
3151
|
+
self.rig_control.set_vfo(vfo)
|
3152
|
+
return
|
3153
|
+
|
3128
3154
|
band = getband(str(vfo))
|
3129
3155
|
self.set_band_indicator(band)
|
3130
3156
|
self.radio_state["vfoa"] = vfo
|
@@ -3132,9 +3158,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
3132
3158
|
self.contact["Band"] = get_logged_band(str(vfo))
|
3133
3159
|
self.set_window_title()
|
3134
3160
|
self.clearinputs()
|
3135
|
-
|
3136
|
-
self.rig_control.set_vfo(vfo)
|
3137
|
-
return
|
3161
|
+
|
3138
3162
|
cmd = {}
|
3139
3163
|
cmd["cmd"] = "RADIO_STATE"
|
3140
3164
|
cmd["station"] = platform.node()
|
@@ -3168,10 +3192,11 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
3168
3192
|
if self.rig_control.interface == "flrig":
|
3169
3193
|
self.cwspeed_spinbox_changed()
|
3170
3194
|
self.rig_control.cat.set_flrig_cw_send(True)
|
3171
|
-
|
3172
|
-
|
3173
|
-
|
3174
|
-
|
3195
|
+
else:
|
3196
|
+
self.setmode("CW")
|
3197
|
+
self.radio_state["mode"] = "CW"
|
3198
|
+
band = getband(str(self.radio_state.get("vfoa", "0.0")))
|
3199
|
+
self.set_band_indicator(band)
|
3175
3200
|
self.set_window_title()
|
3176
3201
|
self.clearinputs()
|
3177
3202
|
self.read_cw_macros()
|
@@ -3193,11 +3218,12 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
3193
3218
|
self.radio_state["mode"] = "USB"
|
3194
3219
|
else:
|
3195
3220
|
self.radio_state["mode"] = "LSB"
|
3196
|
-
if self.rig_control:
|
3221
|
+
if self.rig_control and self.rig_control.online:
|
3197
3222
|
self.rig_control.set_mode(self.radio_state.get("mode"))
|
3198
|
-
|
3199
|
-
|
3200
|
-
|
3223
|
+
else:
|
3224
|
+
self.setmode("SSB")
|
3225
|
+
band = getband(str(self.radio_state.get("vfoa", "0.0")))
|
3226
|
+
self.set_band_indicator(band)
|
3201
3227
|
self.set_window_title()
|
3202
3228
|
self.clearinputs()
|
3203
3229
|
self.read_cw_macros()
|
not1mm/lib/cat_interface.py
CHANGED
@@ -71,6 +71,15 @@ class CAT:
|
|
71
71
|
self.host = host
|
72
72
|
self.port = port
|
73
73
|
self.online = False
|
74
|
+
self.fake_radio = {
|
75
|
+
"vfo": "14032000",
|
76
|
+
"mode": "CW",
|
77
|
+
"bw": "500",
|
78
|
+
"power": "100",
|
79
|
+
"modes": ["CW", "USB", "LSB", "RTTY"],
|
80
|
+
"ptt": False,
|
81
|
+
}
|
82
|
+
|
74
83
|
if self.interface == "flrig":
|
75
84
|
target = f"http://{host}:{port}"
|
76
85
|
logger.debug("%s", target)
|
@@ -84,8 +93,11 @@ class CAT:
|
|
84
93
|
http.client.BadStatusLine,
|
85
94
|
):
|
86
95
|
self.online = False
|
87
|
-
|
96
|
+
elif self.interface == "rigctld":
|
88
97
|
self.__initialize_rigctrld()
|
98
|
+
elif self.interface == "fake":
|
99
|
+
self.online = True
|
100
|
+
return
|
89
101
|
|
90
102
|
def __initialize_rigctrld(self):
|
91
103
|
try:
|
@@ -121,8 +133,7 @@ class CAT:
|
|
121
133
|
logger.debug(f"{texttosend=} {self.interface=}")
|
122
134
|
if self.interface == "flrig":
|
123
135
|
self.sendcwxmlrpc(texttosend)
|
124
|
-
|
125
|
-
if self.interface == "rigctld":
|
136
|
+
elif self.interface == "rigctld":
|
126
137
|
self.sendcwrigctl(texttosend)
|
127
138
|
|
128
139
|
def sendcwrigctl(self, texttosend):
|
@@ -200,10 +211,12 @@ class CAT:
|
|
200
211
|
vfo = ""
|
201
212
|
if self.interface == "flrig":
|
202
213
|
vfo = self.__getvfo_flrig()
|
203
|
-
|
214
|
+
elif self.interface == "rigctld":
|
204
215
|
vfo = self.__getvfo_rigctld()
|
205
216
|
if "RPRT -" in vfo:
|
206
217
|
vfo = ""
|
218
|
+
else:
|
219
|
+
vfo = self.fake_radio.get("vfo", "")
|
207
220
|
return vfo
|
208
221
|
|
209
222
|
def __getvfo_flrig(self) -> str:
|
@@ -243,8 +256,10 @@ class CAT:
|
|
243
256
|
mode = ""
|
244
257
|
if self.interface == "flrig":
|
245
258
|
mode = self.__getmode_flrig()
|
246
|
-
|
259
|
+
elif self.interface == "rigctld":
|
247
260
|
mode = self.__getmode_rigctld()
|
261
|
+
else:
|
262
|
+
mode = self.fake_radio.get("mode")
|
248
263
|
return mode
|
249
264
|
|
250
265
|
def __getmode_flrig(self) -> str:
|
@@ -291,9 +306,10 @@ class CAT:
|
|
291
306
|
"""Get current vfo bandwidth"""
|
292
307
|
if self.interface == "flrig":
|
293
308
|
return self.__getbw_flrig()
|
294
|
-
|
309
|
+
elif self.interface == "rigctld":
|
295
310
|
return self.__getbw_rigctld()
|
296
|
-
|
311
|
+
else:
|
312
|
+
return self.fake_radio.get("bw")
|
297
313
|
|
298
314
|
def __getbw_flrig(self):
|
299
315
|
"""return bandwidth"""
|
@@ -336,9 +352,10 @@ class CAT:
|
|
336
352
|
"""Get power level from rig"""
|
337
353
|
if self.interface == "flrig":
|
338
354
|
return self.__getpower_flrig()
|
339
|
-
|
355
|
+
elif self.interface == "rigctld":
|
340
356
|
return self.__getpower_rigctld()
|
341
|
-
|
357
|
+
else:
|
358
|
+
return self.fake_radio.get("power", "100")
|
342
359
|
|
343
360
|
def __getpower_flrig(self):
|
344
361
|
try:
|
@@ -371,7 +388,7 @@ class CAT:
|
|
371
388
|
"""Get PTT state"""
|
372
389
|
if self.interface == "flrig":
|
373
390
|
return self.__getptt_flrig()
|
374
|
-
|
391
|
+
elif self.interface == "rigctld":
|
375
392
|
return self.__getptt_rigctld()
|
376
393
|
return False
|
377
394
|
|
@@ -411,8 +428,10 @@ class CAT:
|
|
411
428
|
"Get a list of modes supported by the radio"
|
412
429
|
if self.interface == "flrig":
|
413
430
|
return self.__get_mode_list_flrig()
|
414
|
-
|
431
|
+
elif self.interface == "rigctld":
|
415
432
|
return self.__get_mode_list_rigctld()
|
433
|
+
else:
|
434
|
+
return self.fake_radio.get("modes")
|
416
435
|
return False
|
417
436
|
|
418
437
|
def __get_mode_list_flrig(self):
|
@@ -455,8 +474,11 @@ class CAT:
|
|
455
474
|
try:
|
456
475
|
if self.interface == "flrig":
|
457
476
|
return self.__setvfo_flrig(freq)
|
458
|
-
|
477
|
+
elif self.interface == "rigctld":
|
459
478
|
return self.__setvfo_rigctld(freq)
|
479
|
+
else:
|
480
|
+
self.fake_radio["vfo"] = str(freq)
|
481
|
+
return True
|
460
482
|
except ValueError:
|
461
483
|
...
|
462
484
|
return False
|
@@ -497,9 +519,11 @@ class CAT:
|
|
497
519
|
"""Sets the radios mode"""
|
498
520
|
if self.interface == "flrig":
|
499
521
|
return self.__setmode_flrig(mode)
|
500
|
-
|
522
|
+
elif self.interface == "rigctld":
|
501
523
|
return self.__setmode_rigctld(mode)
|
502
|
-
|
524
|
+
else:
|
525
|
+
self.fake_radio["mode"] = mode
|
526
|
+
return True
|
503
527
|
|
504
528
|
def __setmode_flrig(self, mode: str) -> bool:
|
505
529
|
"""Sets the radios mode"""
|
@@ -539,9 +563,11 @@ class CAT:
|
|
539
563
|
"""Sets the radios power"""
|
540
564
|
if self.interface == "flrig":
|
541
565
|
return self.__setpower_flrig(power)
|
542
|
-
|
566
|
+
elif self.interface == "rigctld":
|
543
567
|
return self.__setpower_rigctld(power)
|
544
|
-
|
568
|
+
else:
|
569
|
+
self.fake_radio["power"] = str(power)
|
570
|
+
return True
|
545
571
|
|
546
572
|
def __setpower_flrig(self, power):
|
547
573
|
try:
|
@@ -573,9 +599,11 @@ class CAT:
|
|
573
599
|
"""turn ptt on/off"""
|
574
600
|
if self.interface == "flrig":
|
575
601
|
return self.__ptt_on_flrig()
|
576
|
-
|
602
|
+
elif self.interface == "rigctld":
|
577
603
|
return self.__ptt_on_rigctld()
|
578
|
-
|
604
|
+
else:
|
605
|
+
self.fake_radio["ptt"] = True
|
606
|
+
return True
|
579
607
|
|
580
608
|
def __ptt_on_rigctld(self):
|
581
609
|
"""Toggle PTT state on"""
|
@@ -618,9 +646,11 @@ class CAT:
|
|
618
646
|
"""turn ptt on/off"""
|
619
647
|
if self.interface == "flrig":
|
620
648
|
return self.__ptt_off_flrig()
|
621
|
-
|
649
|
+
elif self.interface == "rigctld":
|
622
650
|
return self.__ptt_off_rigctld()
|
623
|
-
|
651
|
+
else:
|
652
|
+
self.fake_radio["ptt"] = False
|
653
|
+
return True
|
624
654
|
|
625
655
|
def __ptt_off_rigctld(self):
|
626
656
|
"""Toggle PTT state off"""
|
not1mm/lib/version.py
CHANGED
not1mm/logwindow.py
CHANGED
@@ -131,7 +131,9 @@ class LogWindow(QDockWidget):
|
|
131
131
|
|
132
132
|
self.generalLog.cellDoubleClicked.connect(self.double_clicked)
|
133
133
|
self.generalLog.cellChanged.connect(self.cell_changed)
|
134
|
-
|
134
|
+
self.generalLog.horizontalHeader().sectionResized.connect(
|
135
|
+
self.resize_headers_to_match
|
136
|
+
)
|
135
137
|
self.focusedLog.setContextMenuPolicy(
|
136
138
|
QtCore.Qt.ContextMenuPolicy.CustomContextMenu
|
137
139
|
)
|
@@ -143,6 +145,7 @@ class LogWindow(QDockWidget):
|
|
143
145
|
|
144
146
|
for log in (self.generalLog, self.focusedLog):
|
145
147
|
log.setColumnWidth(self.get_column("YYYY-MM-DD HH:MM:SS"), 200)
|
148
|
+
|
146
149
|
log.setColumnWidth(self.get_column("Snt"), 50)
|
147
150
|
log.setColumnWidth(self.get_column("Rcv"), 50)
|
148
151
|
log.setColumnWidth(self.get_column("SentNr"), 75)
|
@@ -172,6 +175,11 @@ class LogWindow(QDockWidget):
|
|
172
175
|
|
173
176
|
self.multicast_interface.send_as_json(cmd)
|
174
177
|
|
178
|
+
def resize_headers_to_match(self) -> None:
|
179
|
+
""""""
|
180
|
+
for i in range(self.generalLog.columnCount()):
|
181
|
+
self.focusedLog.setColumnWidth(i, self.generalLog.columnWidth(i))
|
182
|
+
|
175
183
|
def set_dark_mode(self, dark: bool) -> None:
|
176
184
|
"""Forces a darkmode palette."""
|
177
185
|
|
not1mm/plugins/arrl_dx_cw.py
CHANGED
@@ -56,8 +56,8 @@ def interface(self):
|
|
56
56
|
self.snt_label.setText("SNT")
|
57
57
|
self.field1.setAccessibleName("RST Sent")
|
58
58
|
label = self.field4.findChild(QtWidgets.QLabel)
|
59
|
-
label.setText("Power")
|
60
|
-
self.field4.setAccessibleName("Power")
|
59
|
+
label.setText("Power/State/Province")
|
60
|
+
self.field4.setAccessibleName("Power or state or province")
|
61
61
|
|
62
62
|
|
63
63
|
def reset_label(self):
|
@@ -401,3 +401,94 @@ def recalculate_mults(self):
|
|
401
401
|
else:
|
402
402
|
contact["IsMultiplier1"] = 0
|
403
403
|
self.database.change_contact(contact)
|
404
|
+
|
405
|
+
|
406
|
+
def process_esm(self, new_focused_widget=None, with_enter=False):
|
407
|
+
"""ESM State Machine"""
|
408
|
+
|
409
|
+
# self.pref["run_state"]
|
410
|
+
|
411
|
+
# -----===== Assigned F-Keys =====-----
|
412
|
+
# self.esm_dict["CQ"]
|
413
|
+
# self.esm_dict["EXCH"]
|
414
|
+
# self.esm_dict["QRZ"]
|
415
|
+
# self.esm_dict["AGN"]
|
416
|
+
# self.esm_dict["HISCALL"]
|
417
|
+
# self.esm_dict["MYCALL"]
|
418
|
+
# self.esm_dict["QSOB4"]
|
419
|
+
|
420
|
+
# ----==== text fields ====----
|
421
|
+
# self.callsign
|
422
|
+
# self.sent
|
423
|
+
# self.receive
|
424
|
+
# self.other_1
|
425
|
+
# self.other_2
|
426
|
+
|
427
|
+
if new_focused_widget is not None:
|
428
|
+
self.current_widget = self.inputs_dict.get(new_focused_widget)
|
429
|
+
|
430
|
+
# print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}")
|
431
|
+
|
432
|
+
for a_button in [
|
433
|
+
self.esm_dict["CQ"],
|
434
|
+
self.esm_dict["EXCH"],
|
435
|
+
self.esm_dict["QRZ"],
|
436
|
+
self.esm_dict["AGN"],
|
437
|
+
self.esm_dict["HISCALL"],
|
438
|
+
self.esm_dict["MYCALL"],
|
439
|
+
self.esm_dict["QSOB4"],
|
440
|
+
]:
|
441
|
+
if a_button is not None:
|
442
|
+
self.restore_button_color(a_button)
|
443
|
+
|
444
|
+
buttons_to_send = []
|
445
|
+
|
446
|
+
if self.pref.get("run_state"):
|
447
|
+
if self.current_widget == "callsign":
|
448
|
+
if len(self.callsign.text()) < 3:
|
449
|
+
self.make_button_green(self.esm_dict["CQ"])
|
450
|
+
buttons_to_send.append(self.esm_dict["CQ"])
|
451
|
+
elif len(self.callsign.text()) > 2:
|
452
|
+
self.make_button_green(self.esm_dict["HISCALL"])
|
453
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
454
|
+
buttons_to_send.append(self.esm_dict["HISCALL"])
|
455
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
456
|
+
|
457
|
+
elif self.current_widget == "other_2":
|
458
|
+
if self.other_2.text() == "":
|
459
|
+
self.make_button_green(self.esm_dict["AGN"])
|
460
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
461
|
+
else:
|
462
|
+
self.make_button_green(self.esm_dict["QRZ"])
|
463
|
+
buttons_to_send.append(self.esm_dict["QRZ"])
|
464
|
+
buttons_to_send.append("LOGIT")
|
465
|
+
|
466
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
467
|
+
for button in buttons_to_send:
|
468
|
+
if button:
|
469
|
+
if button == "LOGIT":
|
470
|
+
self.save_contact()
|
471
|
+
continue
|
472
|
+
self.process_function_key(button)
|
473
|
+
else:
|
474
|
+
if self.current_widget == "callsign":
|
475
|
+
if len(self.callsign.text()) > 2:
|
476
|
+
self.make_button_green(self.esm_dict["MYCALL"])
|
477
|
+
buttons_to_send.append(self.esm_dict["MYCALL"])
|
478
|
+
|
479
|
+
elif self.current_widget == "other_2":
|
480
|
+
if self.other_2.text() == "":
|
481
|
+
self.make_button_green(self.esm_dict["AGN"])
|
482
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
483
|
+
else:
|
484
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
485
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
486
|
+
buttons_to_send.append("LOGIT")
|
487
|
+
|
488
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
489
|
+
for button in buttons_to_send:
|
490
|
+
if button:
|
491
|
+
if button == "LOGIT":
|
492
|
+
self.save_contact()
|
493
|
+
continue
|
494
|
+
self.process_function_key(button)
|
not1mm/plugins/arrl_dx_ssb.py
CHANGED
@@ -56,8 +56,8 @@ def interface(self):
|
|
56
56
|
self.snt_label.setText("SNT")
|
57
57
|
self.field1.setAccessibleName("RST Sent")
|
58
58
|
label = self.field4.findChild(QtWidgets.QLabel)
|
59
|
-
label.setText("Power")
|
60
|
-
self.field4.setAccessibleName("Power")
|
59
|
+
label.setText("Power/State/Province")
|
60
|
+
self.field4.setAccessibleName("Power or state or province")
|
61
61
|
|
62
62
|
|
63
63
|
def reset_label(self):
|
@@ -400,3 +400,94 @@ def recalculate_mults(self):
|
|
400
400
|
else:
|
401
401
|
contact["IsMultiplier1"] = 0
|
402
402
|
self.database.change_contact(contact)
|
403
|
+
|
404
|
+
|
405
|
+
def process_esm(self, new_focused_widget=None, with_enter=False):
|
406
|
+
"""ESM State Machine"""
|
407
|
+
|
408
|
+
# self.pref["run_state"]
|
409
|
+
|
410
|
+
# -----===== Assigned F-Keys =====-----
|
411
|
+
# self.esm_dict["CQ"]
|
412
|
+
# self.esm_dict["EXCH"]
|
413
|
+
# self.esm_dict["QRZ"]
|
414
|
+
# self.esm_dict["AGN"]
|
415
|
+
# self.esm_dict["HISCALL"]
|
416
|
+
# self.esm_dict["MYCALL"]
|
417
|
+
# self.esm_dict["QSOB4"]
|
418
|
+
|
419
|
+
# ----==== text fields ====----
|
420
|
+
# self.callsign
|
421
|
+
# self.sent
|
422
|
+
# self.receive
|
423
|
+
# self.other_1
|
424
|
+
# self.other_2
|
425
|
+
|
426
|
+
if new_focused_widget is not None:
|
427
|
+
self.current_widget = self.inputs_dict.get(new_focused_widget)
|
428
|
+
|
429
|
+
# print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}")
|
430
|
+
|
431
|
+
for a_button in [
|
432
|
+
self.esm_dict["CQ"],
|
433
|
+
self.esm_dict["EXCH"],
|
434
|
+
self.esm_dict["QRZ"],
|
435
|
+
self.esm_dict["AGN"],
|
436
|
+
self.esm_dict["HISCALL"],
|
437
|
+
self.esm_dict["MYCALL"],
|
438
|
+
self.esm_dict["QSOB4"],
|
439
|
+
]:
|
440
|
+
if a_button is not None:
|
441
|
+
self.restore_button_color(a_button)
|
442
|
+
|
443
|
+
buttons_to_send = []
|
444
|
+
|
445
|
+
if self.pref.get("run_state"):
|
446
|
+
if self.current_widget == "callsign":
|
447
|
+
if len(self.callsign.text()) < 3:
|
448
|
+
self.make_button_green(self.esm_dict["CQ"])
|
449
|
+
buttons_to_send.append(self.esm_dict["CQ"])
|
450
|
+
elif len(self.callsign.text()) > 2:
|
451
|
+
self.make_button_green(self.esm_dict["HISCALL"])
|
452
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
453
|
+
buttons_to_send.append(self.esm_dict["HISCALL"])
|
454
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
455
|
+
|
456
|
+
elif self.current_widget == "other_2":
|
457
|
+
if self.other_2.text() == "":
|
458
|
+
self.make_button_green(self.esm_dict["AGN"])
|
459
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
460
|
+
else:
|
461
|
+
self.make_button_green(self.esm_dict["QRZ"])
|
462
|
+
buttons_to_send.append(self.esm_dict["QRZ"])
|
463
|
+
buttons_to_send.append("LOGIT")
|
464
|
+
|
465
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
466
|
+
for button in buttons_to_send:
|
467
|
+
if button:
|
468
|
+
if button == "LOGIT":
|
469
|
+
self.save_contact()
|
470
|
+
continue
|
471
|
+
self.process_function_key(button)
|
472
|
+
else:
|
473
|
+
if self.current_widget == "callsign":
|
474
|
+
if len(self.callsign.text()) > 2:
|
475
|
+
self.make_button_green(self.esm_dict["MYCALL"])
|
476
|
+
buttons_to_send.append(self.esm_dict["MYCALL"])
|
477
|
+
|
478
|
+
elif self.current_widget == "other_2":
|
479
|
+
if self.other_2.text() == "":
|
480
|
+
self.make_button_green(self.esm_dict["AGN"])
|
481
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
482
|
+
else:
|
483
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
484
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
485
|
+
buttons_to_send.append("LOGIT")
|
486
|
+
|
487
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
488
|
+
for button in buttons_to_send:
|
489
|
+
if button:
|
490
|
+
if button == "LOGIT":
|
491
|
+
self.save_contact()
|
492
|
+
continue
|
493
|
+
self.process_function_key(button)
|
not1mm/radio.py
CHANGED
@@ -47,6 +47,7 @@ class Radio(QObject):
|
|
47
47
|
def run(self):
|
48
48
|
try:
|
49
49
|
self.cat = CAT(self.interface, self.host, self.port)
|
50
|
+
self.online = self.cat.online
|
50
51
|
self.modes = self.cat.get_mode_list()
|
51
52
|
except ConnectionResetError:
|
52
53
|
...
|
@@ -116,17 +117,19 @@ class Radio(QObject):
|
|
116
117
|
|
117
118
|
if self.cat:
|
118
119
|
self.cat.set_vfo(vfo)
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
120
|
+
|
121
|
+
self.poll_time = datetime.datetime.now()
|
122
|
+
# try:
|
123
|
+
# self.poll_callback.emit(
|
124
|
+
# {
|
125
|
+
# "vfoa": str(self.vfoa),
|
126
|
+
# "mode": self.mode,
|
127
|
+
# "bw": self.bw,
|
128
|
+
# "online": self.online,
|
129
|
+
# }
|
130
|
+
# )
|
131
|
+
# except RuntimeError:
|
132
|
+
# ...
|
130
133
|
|
131
134
|
def set_mode(self, mode):
|
132
135
|
self.mode = mode
|
@@ -134,17 +137,18 @@ class Radio(QObject):
|
|
134
137
|
if self.cat:
|
135
138
|
self.cat.set_mode(mode)
|
136
139
|
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
140
|
+
self.poll_time = datetime.datetime.now()
|
141
|
+
# try:
|
142
|
+
# self.poll_callback.emit(
|
143
|
+
# {
|
144
|
+
# "vfoa": str(self.vfoa),
|
145
|
+
# "mode": self.mode,
|
146
|
+
# "bw": self.bw,
|
147
|
+
# "online": self.online,
|
148
|
+
# }
|
149
|
+
# )
|
150
|
+
# except RuntimeError:
|
151
|
+
# ...
|
148
152
|
|
149
153
|
def get_modes(self):
|
150
154
|
"""get list of modes"""
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: not1mm
|
3
|
-
Version: 24.10.
|
3
|
+
Version: 24.10.20
|
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
|
@@ -208,7 +208,7 @@ generated, 'cause I'm lazy, list of those who've submitted PR's.
|
|
208
208
|
- 10 10 Summer Phone
|
209
209
|
- 10 10 Winter Phone
|
210
210
|
- ARRL 10M
|
211
|
-
- ARRL DX CW, SSB
|
211
|
+
- **ARRL DX CW, SSB**
|
212
212
|
- **ARRL Field Day**
|
213
213
|
- **ARRL Sweepstakes CW, SSB**
|
214
214
|
- ARRL VHF January, June, September
|
@@ -231,6 +231,8 @@ generated, 'cause I'm lazy, list of those who've submitted PR's.
|
|
231
231
|
|
232
232
|
## Recent Changes
|
233
233
|
|
234
|
+
- [24-10-20] Add ESM to ARRL DX.
|
235
|
+
- [24-10-19-1] Rewrite part of CAT control.
|
234
236
|
- [24-10-19] Change ESM button states when the run state is toggled. Add ESM to ARRL Field Day and Winter Field Day.
|
235
237
|
- [24-10-18] Fixed marked spots showing the correct time.
|
236
238
|
- [24-10-17-2] Add ESM to ARRL Sweepstakes.
|
@@ -1,11 +1,11 @@
|
|
1
1
|
not1mm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
not1mm/__main__.py,sha256
|
2
|
+
not1mm/__main__.py,sha256=-khTbJLJfigHJkXwWUGGsTJAgUrGmcJteh4LfSQiTIw,136109
|
3
3
|
not1mm/bandmap.py,sha256=_zbfhuPzJAQWxINJoxaulJ-FPvPP7syBq80JZFdcx14,31768
|
4
4
|
not1mm/checkwindow.py,sha256=VoENHFGlaLfifR2xVkoiGky8SWktlXfUgEuP4DRS998,10584
|
5
5
|
not1mm/fsutils.py,sha256=ukHKxKTeNKxKwqRaJjtzRShL4X5Xl0jRBbADyy3Ifp8,1701
|
6
|
-
not1mm/logwindow.py,sha256=
|
6
|
+
not1mm/logwindow.py,sha256=yFZe1EJ6zP00a80x-EnIwTGIrxjaOVXbFnMJCG9W5os,44717
|
7
7
|
not1mm/lookupservice.py,sha256=jsFg5tsB9cVnahLP-hI3CMwbjlEpMx944O8RLWntAy4,3342
|
8
|
-
not1mm/radio.py,sha256=
|
8
|
+
not1mm/radio.py,sha256=eu1kBjmttREFZ5tAJpNuQSMrmWeKw4Tb-sjgjChUYUs,4693
|
9
9
|
not1mm/test.py,sha256=atZoDXL9DArK4dS8gBCDmlMt5AHuiVZmFOQIp62hDHg,314
|
10
10
|
not1mm/vfo.py,sha256=IvmUQYMIPzLJw_BHQGis4J_IEW-vlBtdfxZLXPh7OzI,12335
|
11
11
|
not1mm/voice_keying.py,sha256=sA3gw5_k7kShTg2qhG7HkKDM5M6KheJVRkAc_C7mxDk,3006
|
@@ -94,7 +94,7 @@ not1mm/data/phonetics/yourcall.wav,sha256=4kheHJmCiRDL2kjhlgXQ8_u_eEMgKxiNGu5UBk
|
|
94
94
|
not1mm/data/phonetics/z.wav,sha256=arafCi7fwmBLdVDI-PRyaL4U-03PIQDhffwY5noJ_2c,51768
|
95
95
|
not1mm/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
96
96
|
not1mm/lib/about.py,sha256=sWycfGcruN3SaEe4JmaJ61K6D8Itq0WxpUYT-lEcmYM,416
|
97
|
-
not1mm/lib/cat_interface.py,sha256=
|
97
|
+
not1mm/lib/cat_interface.py,sha256=Vkxq4JvWguP8O95JYUfQ5hrllzggm6jeFXFiTBKvnw8,22534
|
98
98
|
not1mm/lib/cwinterface.py,sha256=3H_Ur5qtZCg6AA-CBURdnS3IUcvs3YAcwYLO0S8SUBg,3621
|
99
99
|
not1mm/lib/database.py,sha256=nUVG5H2Dy98PGp6Qdr3xU7zM8-8-IiyqRkXZWlWzIe8,44446
|
100
100
|
not1mm/lib/edit_contact.py,sha256=Ki9bGPpqyQQBB1cU8VIBDCal3lbXeQ6qxhzklmhE2_w,353
|
@@ -114,7 +114,7 @@ not1mm/lib/plugin_common.py,sha256=TbFUbftjELFt4QRdsjSHbqnXSngZOlSwlCTClqosDXA,9
|
|
114
114
|
not1mm/lib/select_contest.py,sha256=WsptLuwkouIHeocJL3oZ6-eUfEnhpwdc-x7eMZ_TIVM,359
|
115
115
|
not1mm/lib/settings.py,sha256=7_JFDSKPOd35Gwzqhrbed4EfrlYUm7AEnz2xBRioc-g,13280
|
116
116
|
not1mm/lib/super_check_partial.py,sha256=p5l3u2ZOCBtlWgbvskC50FpuoaIpR07tfC6zTdRWbh4,2334
|
117
|
-
not1mm/lib/version.py,sha256=
|
117
|
+
not1mm/lib/version.py,sha256=BKHnZ2z-XnKmvzHv-N4ivfyTiBU24Tzbxm4GJISEays,49
|
118
118
|
not1mm/lib/versiontest.py,sha256=8vDNptuBBunn-1IGkjNaquehqBYUJyjrPSF8Igmd4_Y,1286
|
119
119
|
not1mm/plugins/10_10_fall_cw.py,sha256=IttjX1yy4nDdACGsiYlPteFG8eVseX_WtoFio6bqHE8,10953
|
120
120
|
not1mm/plugins/10_10_spring_cw.py,sha256=ThCptdM3dX4ywhoy2JRcOEyHSqcJolFaT7O_PYzM1Mg,10958
|
@@ -122,8 +122,8 @@ not1mm/plugins/10_10_summer_phone.py,sha256=VJTCD2JikpzVTEYG6naK_n6cGQXgxVHvLV7p
|
|
122
122
|
not1mm/plugins/10_10_winter_phone.py,sha256=kFz4DRU850_dhHIQAhrVfGfQ8c59Rkcdurq4mk3XBQY,10970
|
123
123
|
not1mm/plugins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
124
124
|
not1mm/plugins/arrl_10m.py,sha256=EyNRb3Sm0Qb-GVm0p05EnadlHisVh7y-sKTBP2ddMLo,13768
|
125
|
-
not1mm/plugins/arrl_dx_cw.py,sha256=
|
126
|
-
not1mm/plugins/arrl_dx_ssb.py,sha256=
|
125
|
+
not1mm/plugins/arrl_dx_cw.py,sha256=Us6jpz2vBDczC3U6UVHXNFWgrUjlbSqpl4IZjSRCJs0,17095
|
126
|
+
not1mm/plugins/arrl_dx_ssb.py,sha256=Eaa22Bl45vJop5Z9TIghDggYHysqfPVWVBbhPLCJpSU,17098
|
127
127
|
not1mm/plugins/arrl_field_day.py,sha256=uXlu2fBGvr2sgcja9IxAiyOCy_ZJuA4NVWfIIA8gN-c,16048
|
128
128
|
not1mm/plugins/arrl_rtty_ru.py,sha256=hKUS4isjdXo3EYxQrsqsDupPp2chW8fpoWj0T1pTgJ4,7994
|
129
129
|
not1mm/plugins/arrl_ss_cw.py,sha256=egbIe-WBmM6oqmc7uWzSnRJaNIImHs8Hgs4PtNfpnEQ,16339
|
@@ -158,9 +158,9 @@ not1mm/plugins/ref_cw.py,sha256=aWjHHkqIKutjRUtzh09y5haFfnZK9poRQDWRQMDRxxU,1632
|
|
158
158
|
not1mm/plugins/stew_perry_topband.py,sha256=CKBQbYl4ETxhXJd2dma4fg_C5pag_s7Nf61SCztZtqE,10668
|
159
159
|
not1mm/plugins/weekly_rtty.py,sha256=ipgY-KlKlEHafnBg-_AFk9KhiXkGTvb4ENoezIeD7jU,18185
|
160
160
|
not1mm/plugins/winter_field_day.py,sha256=nPuPxdK1FimPsHk-uz_3MA4cBqBp6WcwApk7PZwWeWg,13579
|
161
|
-
not1mm-24.10.
|
162
|
-
not1mm-24.10.
|
163
|
-
not1mm-24.10.
|
164
|
-
not1mm-24.10.
|
165
|
-
not1mm-24.10.
|
166
|
-
not1mm-24.10.
|
161
|
+
not1mm-24.10.20.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
162
|
+
not1mm-24.10.20.dist-info/METADATA,sha256=ISoeGm4VSGNngVvUeZqfkhmbZdSJWXUjpemh-wMikCQ,34627
|
163
|
+
not1mm-24.10.20.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
164
|
+
not1mm-24.10.20.dist-info/entry_points.txt,sha256=pMcZk_0dxFgLkcUkF0Q874ojpwOmF3OL6EKw9LgvocM,47
|
165
|
+
not1mm-24.10.20.dist-info/top_level.txt,sha256=0YmTxEcDzQlzXub-lXASvoLpg_mt1c2thb5cVkDf5J4,7
|
166
|
+
not1mm-24.10.20.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|