not1mm 23.12.5__py3-none-any.whl → 24.1.15__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 +249 -399
- not1mm/data/MASTER.SCP +1056 -48577
- not1mm/data/configuration.ui +93 -2
- not1mm/data/cty.json +1 -1
- not1mm/data/main.ui +186 -3
- not1mm/data/new_contest.ui +26 -1
- not1mm/lib/ham_utility.py +16 -4
- not1mm/lib/settings.py +40 -0
- not1mm/lib/version.py +1 -1
- not1mm/plugins/10_10_fall_cw.py +1 -1
- not1mm/plugins/10_10_spring_cw.py +1 -1
- not1mm/plugins/10_10_summer_phone.py +1 -1
- not1mm/plugins/10_10_winter_phone.py +1 -1
- not1mm/plugins/arrl_10m.py +413 -0
- not1mm/plugins/arrl_dx_cw.py +1 -1
- not1mm/plugins/arrl_dx_ssb.py +1 -1
- not1mm/plugins/arrl_ss_cw.py +4 -1
- not1mm/plugins/arrl_ss_phone.py +4 -1
- not1mm/plugins/arrl_vhf_jan.py +390 -0
- not1mm/plugins/arrl_vhf_jun.py +358 -0
- not1mm/plugins/arrl_vhf_sep.py +357 -0
- not1mm/plugins/canada_day.py +5 -2
- not1mm/plugins/cq_wpx_cw.py +1 -1
- not1mm/plugins/cq_wpx_ssb.py +1 -1
- not1mm/plugins/cq_ww_cw.py +1 -1
- not1mm/plugins/cq_ww_ssb.py +1 -1
- not1mm/plugins/cwt.py +5 -2
- not1mm/plugins/general_logging.py +1 -1
- not1mm/plugins/iaru_hf.py +1 -1
- not1mm/plugins/jidx_cw.py +2 -1
- not1mm/plugins/jidx_ph.py +2 -1
- not1mm/plugins/naqp_cw.py +1 -2
- not1mm/plugins/naqp_ssb.py +1 -2
- not1mm/plugins/phone_weekly_test.py +372 -0
- not1mm/plugins/stew_perry_topband.py +336 -0
- not1mm/weee.py +10 -0
- {not1mm-23.12.5.dist-info → not1mm-24.1.15.dist-info}/METADATA +19 -7
- {not1mm-23.12.5.dist-info → not1mm-24.1.15.dist-info}/RECORD +42 -35
- {not1mm-23.12.5.dist-info → not1mm-24.1.15.dist-info}/LICENSE +0 -0
- {not1mm-23.12.5.dist-info → not1mm-24.1.15.dist-info}/WHEEL +0 -0
- {not1mm-23.12.5.dist-info → not1mm-24.1.15.dist-info}/entry_points.txt +0 -0
- {not1mm-23.12.5.dist-info → not1mm-24.1.15.dist-info}/top_level.txt +0 -0
not1mm/__main__.py
CHANGED
@@ -127,6 +127,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
127
127
|
"command_buttons": False,
|
128
128
|
"cw_macros": True,
|
129
129
|
"bands_modes": True,
|
130
|
+
"bands": ["160", "80", "40", "20", "15", "10"],
|
130
131
|
"window_height": 200,
|
131
132
|
"window_width": 600,
|
132
133
|
"window_x": 120,
|
@@ -269,78 +270,148 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
269
270
|
self.radio_icon.setPixmap(self.radio_grey)
|
270
271
|
|
271
272
|
self.F1.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
272
|
-
self.F1.customContextMenuRequested.connect(self.
|
273
|
-
self.F1.clicked.connect(self.
|
273
|
+
self.F1.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F1))
|
274
|
+
self.F1.clicked.connect(lambda x: self.process_function_key(self.F1))
|
274
275
|
self.F2.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
275
|
-
self.F2.customContextMenuRequested.connect(self.
|
276
|
-
self.F2.clicked.connect(self.
|
276
|
+
self.F2.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F2))
|
277
|
+
self.F2.clicked.connect(lambda x: self.process_function_key(self.F2))
|
277
278
|
self.F3.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
278
|
-
self.F3.customContextMenuRequested.connect(self.
|
279
|
-
self.F3.clicked.connect(self.
|
279
|
+
self.F3.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F3))
|
280
|
+
self.F3.clicked.connect(lambda x: self.process_function_key(self.F3))
|
280
281
|
self.F4.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
281
|
-
self.F4.customContextMenuRequested.connect(self.
|
282
|
-
self.F4.clicked.connect(self.
|
282
|
+
self.F4.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F4))
|
283
|
+
self.F4.clicked.connect(lambda x: self.process_function_key(self.F4))
|
283
284
|
self.F5.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
284
|
-
self.F5.customContextMenuRequested.connect(self.
|
285
|
-
self.F5.clicked.connect(self.
|
285
|
+
self.F5.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F5))
|
286
|
+
self.F5.clicked.connect(lambda x: self.process_function_key(self.F5))
|
286
287
|
self.F6.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
287
|
-
self.F6.customContextMenuRequested.connect(self.
|
288
|
-
self.F6.clicked.connect(self.
|
288
|
+
self.F6.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F6))
|
289
|
+
self.F6.clicked.connect(lambda x: self.process_function_key(self.F6))
|
289
290
|
self.F7.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
290
|
-
self.F7.customContextMenuRequested.connect(self.
|
291
|
-
self.F7.clicked.connect(self.
|
291
|
+
self.F7.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F7))
|
292
|
+
self.F7.clicked.connect(lambda x: self.process_function_key(self.F7))
|
292
293
|
self.F8.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
293
|
-
self.F8.customContextMenuRequested.connect(self.
|
294
|
-
self.F8.clicked.connect(self.
|
294
|
+
self.F8.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F8))
|
295
|
+
self.F8.clicked.connect(lambda x: self.process_function_key(self.F8))
|
295
296
|
self.F9.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
296
|
-
self.F9.customContextMenuRequested.connect(self.
|
297
|
-
self.F9.clicked.connect(self.
|
297
|
+
self.F9.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F9))
|
298
|
+
self.F9.clicked.connect(lambda x: self.process_function_key(self.F9))
|
298
299
|
self.F10.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
299
|
-
self.F10.customContextMenuRequested.connect(self.
|
300
|
-
self.F10.clicked.connect(self.
|
300
|
+
self.F10.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F10))
|
301
|
+
self.F10.clicked.connect(lambda x: self.process_function_key(self.F10))
|
301
302
|
self.F11.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
302
|
-
self.F11.customContextMenuRequested.connect(self.
|
303
|
-
self.F11.clicked.connect(self.
|
303
|
+
self.F11.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F11))
|
304
|
+
self.F11.clicked.connect(lambda x: self.process_function_key(self.F11))
|
304
305
|
self.F12.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
305
|
-
self.F12.customContextMenuRequested.connect(self.
|
306
|
-
self.F12.clicked.connect(self.
|
307
|
-
|
308
|
-
self.cw_band_160.mousePressEvent = self.click_160_cw
|
309
|
-
self.cw_band_80.mousePressEvent = self.click_80_cw
|
310
|
-
self.cw_band_40.mousePressEvent = self.click_40_cw
|
311
|
-
self.cw_band_20.mousePressEvent = self.click_20_cw
|
312
|
-
self.cw_band_15.mousePressEvent = self.click_15_cw
|
313
|
-
self.cw_band_10.mousePressEvent = self.click_10_cw
|
314
|
-
|
315
|
-
self.ssb_band_160.mousePressEvent = self.click_160_ssb
|
316
|
-
self.ssb_band_80.mousePressEvent = self.click_80_ssb
|
317
|
-
self.ssb_band_40.mousePressEvent = self.click_40_ssb
|
318
|
-
self.ssb_band_20.mousePressEvent = self.click_20_ssb
|
319
|
-
self.ssb_band_15.mousePressEvent = self.click_15_ssb
|
320
|
-
self.ssb_band_10.mousePressEvent = self.click_10_ssb
|
321
|
-
|
322
|
-
self.rtty_band_160.mousePressEvent = self.click_160_rtty
|
323
|
-
self.rtty_band_80.mousePressEvent = self.click_80_rtty
|
324
|
-
self.rtty_band_40.mousePressEvent = self.click_40_rtty
|
325
|
-
self.rtty_band_20.mousePressEvent = self.click_20_rtty
|
326
|
-
self.rtty_band_15.mousePressEvent = self.click_15_rtty
|
327
|
-
self.rtty_band_10.mousePressEvent = self.click_10_rtty
|
306
|
+
self.F12.customContextMenuRequested.connect(lambda x: self.edit_macro(self.F12))
|
307
|
+
self.F12.clicked.connect(lambda x: self.process_function_key(self.F12))
|
328
308
|
|
329
|
-
self.
|
330
|
-
|
331
|
-
|
332
|
-
self.
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
self.
|
342
|
-
|
343
|
-
|
309
|
+
self.cw_band_160.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
310
|
+
160, "CW"
|
311
|
+
)
|
312
|
+
self.cw_band_80.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
313
|
+
80, "CW"
|
314
|
+
)
|
315
|
+
self.cw_band_40.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
316
|
+
40, "CW"
|
317
|
+
)
|
318
|
+
self.cw_band_20.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
319
|
+
20, "CW"
|
320
|
+
)
|
321
|
+
self.cw_band_15.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
322
|
+
15, "CW"
|
323
|
+
)
|
324
|
+
self.cw_band_10.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
325
|
+
10, "CW"
|
326
|
+
)
|
327
|
+
self.cw_band_6.mousePressEvent = lambda x: self.change_to_band_and_mode(6, "CW")
|
328
|
+
self.cw_band_2.mousePressEvent = lambda x: self.change_to_band_and_mode(2, "CW")
|
329
|
+
self.cw_band_125.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
330
|
+
222, "CW"
|
331
|
+
)
|
332
|
+
self.cw_band_70cm.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
333
|
+
432, "CW"
|
334
|
+
)
|
335
|
+
self.cw_band_33cm.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
336
|
+
902, "CW"
|
337
|
+
)
|
338
|
+
self.cw_band_23cm.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
339
|
+
1240, "CW"
|
340
|
+
)
|
341
|
+
|
342
|
+
self.ssb_band_160.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
343
|
+
160, "SSB"
|
344
|
+
)
|
345
|
+
self.ssb_band_80.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
346
|
+
80, "SSB"
|
347
|
+
)
|
348
|
+
self.ssb_band_40.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
349
|
+
40, "SSB"
|
350
|
+
)
|
351
|
+
self.ssb_band_20.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
352
|
+
20, "SSB"
|
353
|
+
)
|
354
|
+
self.ssb_band_15.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
355
|
+
15, "SSB"
|
356
|
+
)
|
357
|
+
self.ssb_band_10.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
358
|
+
10, "SSB"
|
359
|
+
)
|
360
|
+
self.ssb_band_6.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
361
|
+
6, "SSB"
|
362
|
+
)
|
363
|
+
self.ssb_band_2.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
364
|
+
2, "SSB"
|
365
|
+
)
|
366
|
+
self.ssb_band_125.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
367
|
+
222, "SSB"
|
368
|
+
)
|
369
|
+
self.ssb_band_70cm.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
370
|
+
432, "SSB"
|
371
|
+
)
|
372
|
+
self.ssb_band_33cm.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
373
|
+
902, "SSB"
|
374
|
+
)
|
375
|
+
self.ssb_band_23cm.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
376
|
+
1240, "SSB"
|
377
|
+
)
|
378
|
+
|
379
|
+
self.rtty_band_160.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
380
|
+
160, "RTTY"
|
381
|
+
)
|
382
|
+
self.rtty_band_80.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
383
|
+
80, "RTTY"
|
384
|
+
)
|
385
|
+
self.rtty_band_40.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
386
|
+
40, "RTTY"
|
387
|
+
)
|
388
|
+
self.rtty_band_20.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
389
|
+
20, "RTTY"
|
390
|
+
)
|
391
|
+
self.rtty_band_15.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
392
|
+
15, "RTTY"
|
393
|
+
)
|
394
|
+
self.rtty_band_10.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
395
|
+
10, "RTTY"
|
396
|
+
)
|
397
|
+
self.rtty_band_6.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
398
|
+
6, "RTTY"
|
399
|
+
)
|
400
|
+
self.rtty_band_2.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
401
|
+
2, "RTTY"
|
402
|
+
)
|
403
|
+
self.rtty_band_125.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
404
|
+
222, "RTTY"
|
405
|
+
)
|
406
|
+
self.rtty_band_70cm.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
407
|
+
432, "RTTY"
|
408
|
+
)
|
409
|
+
self.rtty_band_33cm.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
410
|
+
902, "RTTY"
|
411
|
+
)
|
412
|
+
self.rtty_band_23cm.mousePressEvent = lambda x: self.change_to_band_and_mode(
|
413
|
+
1240, "RTTY"
|
414
|
+
)
|
344
415
|
|
345
416
|
self.band_indicators_cw = {
|
346
417
|
"160": self.cw_band_160,
|
@@ -349,6 +420,12 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
349
420
|
"20": self.cw_band_20,
|
350
421
|
"15": self.cw_band_15,
|
351
422
|
"10": self.cw_band_10,
|
423
|
+
"6": self.cw_band_6,
|
424
|
+
"2": self.cw_band_2,
|
425
|
+
"1.25": self.cw_band_125,
|
426
|
+
"70cm": self.cw_band_70cm,
|
427
|
+
"33cm": self.cw_band_33cm,
|
428
|
+
"23cm": self.cw_band_23cm,
|
352
429
|
}
|
353
430
|
|
354
431
|
self.band_indicators_ssb = {
|
@@ -358,6 +435,12 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
358
435
|
"20": self.ssb_band_20,
|
359
436
|
"15": self.ssb_band_15,
|
360
437
|
"10": self.ssb_band_10,
|
438
|
+
"6": self.ssb_band_6,
|
439
|
+
"2": self.ssb_band_2,
|
440
|
+
"1.25": self.ssb_band_125,
|
441
|
+
"70cm": self.ssb_band_70cm,
|
442
|
+
"33cm": self.ssb_band_33cm,
|
443
|
+
"23cm": self.ssb_band_23cm,
|
361
444
|
}
|
362
445
|
|
363
446
|
self.band_indicators_rtty = {
|
@@ -367,6 +450,12 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
367
450
|
"20": self.rtty_band_20,
|
368
451
|
"15": self.rtty_band_15,
|
369
452
|
"10": self.rtty_band_10,
|
453
|
+
"6": self.rtty_band_6,
|
454
|
+
"2": self.rtty_band_2,
|
455
|
+
"1.25": self.rtty_band_125,
|
456
|
+
"70cm": self.rtty_band_70cm,
|
457
|
+
"33cm": self.rtty_band_33cm,
|
458
|
+
"23cm": self.rtty_band_23cm,
|
370
459
|
}
|
371
460
|
|
372
461
|
self.all_mode_indicators = {
|
@@ -375,6 +464,22 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
375
464
|
"RTTY": self.band_indicators_rtty,
|
376
465
|
}
|
377
466
|
|
467
|
+
self.readpreferences()
|
468
|
+
self.dbname = DATA_PATH + "/" + self.pref.get("current_database", "ham.db")
|
469
|
+
self.database = DataBase(self.dbname, WORKING_PATH)
|
470
|
+
self.station = self.database.fetch_station()
|
471
|
+
if self.station is None:
|
472
|
+
self.station = {}
|
473
|
+
self.edit_station_settings()
|
474
|
+
self.station = self.database.fetch_station()
|
475
|
+
if self.station is None:
|
476
|
+
self.station = {}
|
477
|
+
self.contact = self.database.empty_contact
|
478
|
+
self.current_op = self.station.get("Call", "")
|
479
|
+
self.make_op_dir()
|
480
|
+
self.read_cw_macros()
|
481
|
+
self.clearinputs()
|
482
|
+
|
378
483
|
if self.pref.get("contest"):
|
379
484
|
self.load_contest()
|
380
485
|
|
@@ -417,87 +522,27 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
417
522
|
self.cw.sendcw(newtext[len(self.oldtext) :])
|
418
523
|
self.oldtext = newtext
|
419
524
|
|
420
|
-
def
|
421
|
-
"""
|
422
|
-
|
423
|
-
|
424
|
-
def click_80_cw(self, _event) -> None:
|
425
|
-
"""doc"""
|
426
|
-
self.change_to_band_and_mode(80, "CW")
|
427
|
-
|
428
|
-
def click_40_cw(self, _event) -> None:
|
429
|
-
"""doc"""
|
430
|
-
self.change_to_band_and_mode(40, "CW")
|
431
|
-
|
432
|
-
def click_20_cw(self, _event) -> None:
|
433
|
-
"""doc"""
|
434
|
-
self.change_to_band_and_mode(20, "CW")
|
435
|
-
|
436
|
-
def click_15_cw(self, _event) -> None:
|
437
|
-
"""doc"""
|
438
|
-
self.change_to_band_and_mode(15, "CW")
|
439
|
-
|
440
|
-
def click_10_cw(self, _event) -> None:
|
441
|
-
"""doc"""
|
442
|
-
self.change_to_band_and_mode(10, "CW")
|
443
|
-
|
444
|
-
def click_160_ssb(self, _event) -> None:
|
445
|
-
"""doc"""
|
446
|
-
self.change_to_band_and_mode(160, "SSB")
|
447
|
-
|
448
|
-
def click_80_ssb(self, _event) -> None:
|
449
|
-
"""doc"""
|
450
|
-
self.change_to_band_and_mode(80, "SSB")
|
451
|
-
|
452
|
-
def click_40_ssb(self, _event) -> None:
|
453
|
-
"""doc"""
|
454
|
-
self.change_to_band_and_mode(40, "SSB")
|
455
|
-
|
456
|
-
def click_20_ssb(self, _event) -> None:
|
457
|
-
"""doc"""
|
458
|
-
self.change_to_band_and_mode(20, "SSB")
|
459
|
-
|
460
|
-
def click_15_ssb(self, _event) -> None:
|
461
|
-
"""doc"""
|
462
|
-
self.change_to_band_and_mode(15, "SSB")
|
463
|
-
|
464
|
-
def click_10_ssb(self, _event) -> None:
|
465
|
-
"""doc"""
|
466
|
-
self.change_to_band_and_mode(10, "SSB")
|
467
|
-
|
468
|
-
def click_160_rtty(self, _event) -> None:
|
469
|
-
"""doc"""
|
470
|
-
self.change_to_band_and_mode(160, "RTTY")
|
471
|
-
|
472
|
-
def click_80_rtty(self, _event) -> None:
|
473
|
-
"""doc"""
|
474
|
-
self.change_to_band_and_mode(80, "RTTY")
|
475
|
-
|
476
|
-
def click_40_rtty(self, _event) -> None:
|
477
|
-
"""doc"""
|
478
|
-
self.change_to_band_and_mode(40, "RTTY")
|
479
|
-
|
480
|
-
def click_20_rtty(self, _event) -> None:
|
481
|
-
"""doc"""
|
482
|
-
self.change_to_band_and_mode(20, "RTTY")
|
483
|
-
|
484
|
-
def click_15_rtty(self, _event) -> None:
|
485
|
-
"""doc"""
|
486
|
-
self.change_to_band_and_mode(15, "RTTY")
|
525
|
+
def change_to_band_and_mode(self, band: int, mode: str) -> None:
|
526
|
+
"""
|
527
|
+
Gets a sane frequency for the chosen band and mode.
|
528
|
+
Then changes to that,
|
487
529
|
|
488
|
-
|
489
|
-
|
490
|
-
|
530
|
+
Parameters
|
531
|
+
----------
|
532
|
+
band : int
|
533
|
+
mode : str
|
491
534
|
|
492
|
-
|
493
|
-
|
535
|
+
Returns
|
536
|
+
-------
|
537
|
+
Nothing
|
538
|
+
"""
|
494
539
|
if mode in ["CW", "SSB", "RTTY"]:
|
495
540
|
freq = fakefreq(str(band), mode)
|
496
541
|
self.change_freq(freq)
|
497
542
|
self.change_mode(mode)
|
498
543
|
|
499
544
|
def quit_app(self) -> None:
|
500
|
-
"""
|
545
|
+
"""Send multicast quit message, then quit the program."""
|
501
546
|
cmd = {}
|
502
547
|
cmd["cmd"] = "HALT"
|
503
548
|
cmd["station"] = platform.node()
|
@@ -801,34 +846,40 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
801
846
|
self.pref.get("contest")
|
802
847
|
)
|
803
848
|
if self.contest_settings:
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
self.contest.init_contest(self)
|
810
|
-
self.hide_band_mode(self.contest_settings.get("ModeCategory", ""))
|
811
|
-
logger.debug("%s", f"{self.contest_settings}")
|
812
|
-
if self.contest_settings.get("ModeCategory", "") == "CW":
|
813
|
-
self.setmode("CW")
|
814
|
-
self.radio_state["mode"] = "CW"
|
815
|
-
if self.rig_control:
|
816
|
-
if self.rig_control.online:
|
817
|
-
self.rig_control.set_mode("CW")
|
818
|
-
band = getband(str(self.radio_state.get("vfoa", "0.0")))
|
819
|
-
self.set_band_indicator(band)
|
820
|
-
self.set_window_title()
|
821
|
-
if self.contest_settings.get("ModeCategory", "") == "SSB":
|
822
|
-
self.setmode("SSB")
|
823
|
-
if int(self.radio_state.get("vfoa", 0)) > 10000000:
|
824
|
-
self.radio_state["mode"] = "USB"
|
825
|
-
else:
|
826
|
-
self.radio_state["mode"] = "LSB"
|
827
|
-
band = getband(str(self.radio_state.get("vfoa", "0.0")))
|
828
|
-
self.set_band_indicator(band)
|
849
|
+
try:
|
850
|
+
self.database.current_contest = self.pref.get("contest")
|
851
|
+
if self.contest_settings.get("ContestName"):
|
852
|
+
self.contest = doimp(self.contest_settings.get("ContestName"))
|
853
|
+
logger.debug("Loaded Contest Name = %s", self.contest.name)
|
829
854
|
self.set_window_title()
|
830
|
-
|
831
|
-
|
855
|
+
self.contest.init_contest(self)
|
856
|
+
self.hide_band_mode(
|
857
|
+
self.contest_settings.get("ModeCategory", "")
|
858
|
+
)
|
859
|
+
logger.debug("%s", f"{self.contest_settings}")
|
860
|
+
if self.contest_settings.get("ModeCategory", "") == "CW":
|
861
|
+
self.setmode("CW")
|
862
|
+
self.radio_state["mode"] = "CW"
|
863
|
+
if self.rig_control:
|
864
|
+
if self.rig_control.online:
|
865
|
+
self.rig_control.set_mode("CW")
|
866
|
+
band = getband(str(self.radio_state.get("vfoa", "0.0")))
|
867
|
+
self.set_band_indicator(band)
|
868
|
+
self.set_window_title()
|
869
|
+
if self.contest_settings.get("ModeCategory", "") == "SSB":
|
870
|
+
self.setmode("SSB")
|
871
|
+
if int(self.radio_state.get("vfoa", 0)) > 10000000:
|
872
|
+
self.radio_state["mode"] = "USB"
|
873
|
+
else:
|
874
|
+
self.radio_state["mode"] = "LSB"
|
875
|
+
band = getband(str(self.radio_state.get("vfoa", "0.0")))
|
876
|
+
self.set_band_indicator(band)
|
877
|
+
self.set_window_title()
|
878
|
+
if self.rig_control:
|
879
|
+
self.rig_control.set_mode(self.radio_state.get("mode"))
|
880
|
+
except ModuleNotFoundError:
|
881
|
+
self.pref["contest"] = 1
|
882
|
+
self.show_message_box("Contest plugin not found")
|
832
883
|
|
833
884
|
if hasattr(self.contest, "mode"):
|
834
885
|
logger.debug("%s", f" **** {self.contest}")
|
@@ -1189,29 +1240,29 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1189
1240
|
next_tab.end(False)
|
1190
1241
|
return
|
1191
1242
|
if event.key() == Qt.Key_F1:
|
1192
|
-
self.
|
1243
|
+
self.process_function_key(self.F1)
|
1193
1244
|
if event.key() == Qt.Key_F2:
|
1194
|
-
self.
|
1245
|
+
self.process_function_key(self.F2)
|
1195
1246
|
if event.key() == Qt.Key_F3:
|
1196
|
-
self.
|
1247
|
+
self.process_function_key(self.F3)
|
1197
1248
|
if event.key() == Qt.Key_F4:
|
1198
|
-
self.
|
1249
|
+
self.process_function_key(self.F4)
|
1199
1250
|
if event.key() == Qt.Key_F5:
|
1200
|
-
self.
|
1251
|
+
self.process_function_key(self.F5)
|
1201
1252
|
if event.key() == Qt.Key_F6:
|
1202
|
-
self.
|
1253
|
+
self.process_function_key(self.F6)
|
1203
1254
|
if event.key() == Qt.Key_F7:
|
1204
|
-
self.
|
1255
|
+
self.process_function_key(self.F7)
|
1205
1256
|
if event.key() == Qt.Key_F8:
|
1206
|
-
self.
|
1257
|
+
self.process_function_key(self.F8)
|
1207
1258
|
if event.key() == Qt.Key_F9:
|
1208
|
-
self.
|
1259
|
+
self.process_function_key(self.F9)
|
1209
1260
|
if event.key() == Qt.Key_F10:
|
1210
|
-
self.
|
1261
|
+
self.process_function_key(self.F10)
|
1211
1262
|
if event.key() == Qt.Key_F11:
|
1212
|
-
self.
|
1263
|
+
self.process_function_key(self.F11)
|
1213
1264
|
if event.key() == Qt.Key_F12:
|
1214
|
-
self.
|
1265
|
+
self.process_function_key(self.F12)
|
1215
1266
|
|
1216
1267
|
def set_window_title(self) -> None:
|
1217
1268
|
"""Set window title"""
|
@@ -1352,12 +1403,6 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1352
1403
|
self.n1mm.contact_info["zn"] = self.contact["ZN"]
|
1353
1404
|
self.n1mm.contact_info["power"] = self.contact["Power"]
|
1354
1405
|
self.n1mm.contact_info["band"] = self.contact["Band"]
|
1355
|
-
# self.n1mm.contact_info['']
|
1356
|
-
# self.n1mm.contact_info['']
|
1357
|
-
# self.n1mm.contact_info['']
|
1358
|
-
# self.n1mm.contact_info['']
|
1359
|
-
# self.n1mm.contact_info['']
|
1360
|
-
# self.n1mm.contact_info['']
|
1361
1406
|
logger.debug("%s", f"{self.n1mm.contact_info}")
|
1362
1407
|
self.n1mm.send_contact_info()
|
1363
1408
|
|
@@ -1371,39 +1416,6 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1371
1416
|
cmd["station"] = platform.node()
|
1372
1417
|
self.multicast_interface.send_as_json(cmd)
|
1373
1418
|
|
1374
|
-
# self.contact["ContestName"] = self.contest.name
|
1375
|
-
# self.contact["SNT"] = self.sent.text()
|
1376
|
-
# self.contact["RCV"] = self.receive.text()
|
1377
|
-
# self.contact["CountryPrefix"]
|
1378
|
-
# self.contact["StationPrefix"] = self.pref.get("callsign", "")
|
1379
|
-
# self.contact["QTH"]
|
1380
|
-
# self.contact["Name"] = self.other_1.text()
|
1381
|
-
# self.contact["Comment"] = self.other_2.text()
|
1382
|
-
# self.contact["NR"]
|
1383
|
-
# self.contact["Sect"]
|
1384
|
-
# self.contact["Prec"]
|
1385
|
-
# self.contact["CK"]
|
1386
|
-
# self.contact["ZN"]
|
1387
|
-
# self.contact["SentNr"]
|
1388
|
-
# self.contact["Points"]
|
1389
|
-
# self.contact["IsMultiplier1"]
|
1390
|
-
# self.contact["IsMultiplier2"]
|
1391
|
-
# self.contact["Power"]
|
1392
|
-
# self.contact["Band"]
|
1393
|
-
# self.contact["WPXPrefix"] = calculate_wpx_prefix(self.callsign.text())
|
1394
|
-
# self.contact["Exchange1"]
|
1395
|
-
# self.contact["RadioNR"]
|
1396
|
-
# self.contact["isMultiplier3"]
|
1397
|
-
# self.contact["MiscText"]
|
1398
|
-
# self.contact["ContactType"]
|
1399
|
-
# self.contact["Run1Run2"]
|
1400
|
-
# self.contact["GridSquare"]
|
1401
|
-
# self.contact["Continent"]
|
1402
|
-
# self.contact["RoverLocation"]
|
1403
|
-
# self.contact["RadioInterfaced"]
|
1404
|
-
# self.contact["NetworkedCompNr"]
|
1405
|
-
# self.contact["CLAIMEDQSO"]
|
1406
|
-
|
1407
1419
|
def new_contest_dialog(self) -> None:
|
1408
1420
|
"""Show new contest dialog"""
|
1409
1421
|
logger.debug("New contest Dialog")
|
@@ -1529,66 +1541,6 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1529
1541
|
)
|
1530
1542
|
self.edit_macro_dialog.close()
|
1531
1543
|
|
1532
|
-
def edit_F1(self) -> None:
|
1533
|
-
"""stub"""
|
1534
|
-
logger.debug("F1 Right Clicked.")
|
1535
|
-
self.edit_macro(self.F1)
|
1536
|
-
|
1537
|
-
def edit_F2(self) -> None:
|
1538
|
-
"""stub"""
|
1539
|
-
logger.debug("F2 Right Clicked.")
|
1540
|
-
self.edit_macro(self.F2)
|
1541
|
-
|
1542
|
-
def edit_F3(self) -> None:
|
1543
|
-
"""stub"""
|
1544
|
-
logger.debug("F3 Right Clicked.")
|
1545
|
-
self.edit_macro(self.F3)
|
1546
|
-
|
1547
|
-
def edit_F4(self) -> None:
|
1548
|
-
"""stub"""
|
1549
|
-
logger.debug("F4 Right Clicked.")
|
1550
|
-
self.edit_macro(self.F4)
|
1551
|
-
|
1552
|
-
def edit_F5(self) -> None:
|
1553
|
-
"""stub"""
|
1554
|
-
logger.debug("F5 Right Clicked.")
|
1555
|
-
self.edit_macro(self.F5)
|
1556
|
-
|
1557
|
-
def edit_F6(self) -> None:
|
1558
|
-
"""stub"""
|
1559
|
-
logger.debug("F6 Right Clicked.")
|
1560
|
-
self.edit_macro(self.F6)
|
1561
|
-
|
1562
|
-
def edit_F7(self) -> None:
|
1563
|
-
"""stub"""
|
1564
|
-
logger.debug("F7 Right Clicked.")
|
1565
|
-
self.edit_macro(self.F7)
|
1566
|
-
|
1567
|
-
def edit_F8(self) -> None:
|
1568
|
-
"""stub"""
|
1569
|
-
logger.debug("F8 Right Clicked.")
|
1570
|
-
self.edit_macro(self.F8)
|
1571
|
-
|
1572
|
-
def edit_F9(self) -> None:
|
1573
|
-
"""stub"""
|
1574
|
-
logger.debug("F9 Right Clicked.")
|
1575
|
-
self.edit_macro(self.F9)
|
1576
|
-
|
1577
|
-
def edit_F10(self) -> None:
|
1578
|
-
"""stub"""
|
1579
|
-
logger.debug("F10 Right Clicked.")
|
1580
|
-
self.edit_macro(self.F10)
|
1581
|
-
|
1582
|
-
def edit_F11(self) -> None:
|
1583
|
-
"""stub"""
|
1584
|
-
logger.debug("F11 Right Clicked.")
|
1585
|
-
self.edit_macro(self.F11)
|
1586
|
-
|
1587
|
-
def edit_F12(self) -> None:
|
1588
|
-
"""stub"""
|
1589
|
-
logger.debug("F12 Right Clicked.")
|
1590
|
-
self.edit_macro(self.F12)
|
1591
|
-
|
1592
1544
|
def process_macro(self, macro: str) -> str:
|
1593
1545
|
"""Process CW macro substitutions"""
|
1594
1546
|
result = self.database.get_serial()
|
@@ -1663,137 +1615,16 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1663
1615
|
app.processEvents()
|
1664
1616
|
self.rig_control.ptt_off()
|
1665
1617
|
|
1666
|
-
def
|
1667
|
-
"""
|
1618
|
+
def process_function_key(self, function_key) -> None:
|
1619
|
+
"""Called when a function key is clicked."""
|
1668
1620
|
logger.debug("F1 Clicked")
|
1669
1621
|
if self.n1mm:
|
1670
|
-
self.n1mm.radio_info["FunctionKeyCaption"] =
|
1671
|
-
if self.radio_state.get("mode") in ["LSB", "USB", "SSB"]:
|
1672
|
-
self.voice_string(self.process_macro(self.F1.toolTip()))
|
1673
|
-
return
|
1674
|
-
if self.cw:
|
1675
|
-
self.cw.sendcw(self.process_macro(self.F1.toolTip()))
|
1676
|
-
|
1677
|
-
def sendf2(self) -> None:
|
1678
|
-
"""stub"""
|
1679
|
-
logger.debug("F2 Clicked")
|
1680
|
-
if self.n1mm:
|
1681
|
-
self.n1mm.radio_info["FunctionKeyCaption"] = self.F2.text()
|
1682
|
-
if self.radio_state.get("mode") in ["LSB", "USB", "SSB"]:
|
1683
|
-
self.voice_string(self.process_macro(self.F2.toolTip()))
|
1684
|
-
return
|
1685
|
-
if self.cw:
|
1686
|
-
self.cw.sendcw(self.process_macro(self.F2.toolTip()))
|
1687
|
-
|
1688
|
-
def sendf3(self) -> None:
|
1689
|
-
"""stub"""
|
1690
|
-
logger.debug("F3 Clicked")
|
1691
|
-
if self.n1mm:
|
1692
|
-
self.n1mm.radio_info["FunctionKeyCaption"] = self.F3.text()
|
1693
|
-
if self.radio_state.get("mode") in ["LSB", "USB", "SSB"]:
|
1694
|
-
self.voice_string(self.process_macro(self.F3.toolTip()))
|
1695
|
-
return
|
1696
|
-
if self.cw:
|
1697
|
-
self.cw.sendcw(self.process_macro(self.F3.toolTip()))
|
1698
|
-
|
1699
|
-
def sendf4(self) -> None:
|
1700
|
-
"""stub"""
|
1701
|
-
logger.debug("F4 Clicked")
|
1702
|
-
if self.n1mm:
|
1703
|
-
self.n1mm.radio_info["FunctionKeyCaption"] = self.F4.text()
|
1704
|
-
if self.radio_state.get("mode") in ["LSB", "USB", "SSB"]:
|
1705
|
-
self.voice_string(self.process_macro(self.F4.toolTip()))
|
1706
|
-
return
|
1707
|
-
if self.cw:
|
1708
|
-
self.cw.sendcw(self.process_macro(self.F4.toolTip()))
|
1709
|
-
|
1710
|
-
def sendf5(self) -> None:
|
1711
|
-
"""stub"""
|
1712
|
-
logger.debug("F5 Clicked")
|
1713
|
-
if self.n1mm:
|
1714
|
-
self.n1mm.radio_info["FunctionKeyCaption"] = self.F5.text()
|
1622
|
+
self.n1mm.radio_info["FunctionKeyCaption"] = function_key.text()
|
1715
1623
|
if self.radio_state.get("mode") in ["LSB", "USB", "SSB"]:
|
1716
|
-
self.voice_string(self.process_macro(
|
1624
|
+
self.voice_string(self.process_macro(function_key.toolTip()))
|
1717
1625
|
return
|
1718
1626
|
if self.cw:
|
1719
|
-
self.cw.sendcw(self.process_macro(
|
1720
|
-
|
1721
|
-
def sendf6(self) -> None:
|
1722
|
-
"""stub"""
|
1723
|
-
logger.debug("F6 Clicked")
|
1724
|
-
if self.n1mm:
|
1725
|
-
self.n1mm.radio_info["FunctionKeyCaption"] = self.F6.text()
|
1726
|
-
if self.radio_state.get("mode") in ["LSB", "USB", "SSB"]:
|
1727
|
-
self.voice_string(self.process_macro(self.F6.toolTip()))
|
1728
|
-
return
|
1729
|
-
if self.cw:
|
1730
|
-
self.cw.sendcw(self.process_macro(self.F6.toolTip()))
|
1731
|
-
|
1732
|
-
def sendf7(self) -> None:
|
1733
|
-
"""stub"""
|
1734
|
-
logger.debug("F7 Clicked")
|
1735
|
-
if self.n1mm:
|
1736
|
-
self.n1mm.radio_info["FunctionKeyCaption"] = self.F7.text()
|
1737
|
-
if self.radio_state.get("mode") in ["LSB", "USB", "SSB"]:
|
1738
|
-
self.voice_string(self.process_macro(self.F7.toolTip()))
|
1739
|
-
return
|
1740
|
-
if self.cw:
|
1741
|
-
self.cw.sendcw(self.process_macro(self.F7.toolTip()))
|
1742
|
-
|
1743
|
-
def sendf8(self) -> None:
|
1744
|
-
"""stub"""
|
1745
|
-
logger.debug("F8 Clicked")
|
1746
|
-
if self.n1mm:
|
1747
|
-
self.n1mm.radio_info["FunctionKeyCaption"] = self.F8.text()
|
1748
|
-
if self.radio_state.get("mode") in ["LSB", "USB", "SSB"]:
|
1749
|
-
self.voice_string(self.process_macro(self.F8.toolTip()))
|
1750
|
-
return
|
1751
|
-
if self.cw:
|
1752
|
-
self.cw.sendcw(self.process_macro(self.F8.toolTip()))
|
1753
|
-
|
1754
|
-
def sendf9(self) -> None:
|
1755
|
-
"""stub"""
|
1756
|
-
logger.debug("F9 Clicked")
|
1757
|
-
if self.n1mm:
|
1758
|
-
self.n1mm.radio_info["FunctionKeyCaption"] = self.F9.text()
|
1759
|
-
if self.radio_state.get("mode") in ["LSB", "USB", "SSB"]:
|
1760
|
-
self.voice_string(self.process_macro(self.F9.toolTip()))
|
1761
|
-
return
|
1762
|
-
if self.cw:
|
1763
|
-
self.cw.sendcw(self.process_macro(self.F9.toolTip()))
|
1764
|
-
|
1765
|
-
def sendf10(self) -> None:
|
1766
|
-
"""stub"""
|
1767
|
-
logger.debug("F10 Clicked")
|
1768
|
-
if self.n1mm:
|
1769
|
-
self.n1mm.radio_info["FunctionKeyCaption"] = self.F10.text()
|
1770
|
-
if self.radio_state.get("mode") in ["LSB", "USB", "SSB"]:
|
1771
|
-
self.voice_string(self.process_macro(self.F10.toolTip()))
|
1772
|
-
return
|
1773
|
-
if self.cw:
|
1774
|
-
self.cw.sendcw(self.process_macro(self.F10.toolTip()))
|
1775
|
-
|
1776
|
-
def sendf11(self) -> None:
|
1777
|
-
"""stub"""
|
1778
|
-
logger.debug("F11 Clicked")
|
1779
|
-
if self.n1mm:
|
1780
|
-
self.n1mm.radio_info["FunctionKeyCaption"] = self.F11.text()
|
1781
|
-
if self.radio_state.get("mode") in ["LSB", "USB", "SSB"]:
|
1782
|
-
self.voice_string(self.process_macro(self.F11.toolTip()))
|
1783
|
-
return
|
1784
|
-
if self.cw:
|
1785
|
-
self.cw.sendcw(self.process_macro(self.F11.toolTip()))
|
1786
|
-
|
1787
|
-
def sendf12(self) -> None:
|
1788
|
-
"""stub"""
|
1789
|
-
logger.debug("F12 Clicked")
|
1790
|
-
if self.n1mm:
|
1791
|
-
self.n1mm.radio_info["FunctionKeyCaption"] = self.F12.text()
|
1792
|
-
if self.radio_state.get("mode") in ["LSB", "USB", "SSB"]:
|
1793
|
-
self.voice_string(self.process_macro(self.F12.toolTip()))
|
1794
|
-
return
|
1795
|
-
if self.cw:
|
1796
|
-
self.cw.sendcw(self.process_macro(self.F12.toolTip()))
|
1627
|
+
self.cw.sendcw(self.process_macro(function_key.toolTip()))
|
1797
1628
|
|
1798
1629
|
def run_sp_buttons_clicked(self) -> None:
|
1799
1630
|
"""Handle run/s&p mode"""
|
@@ -1932,6 +1763,22 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1932
1763
|
|
1933
1764
|
self.show_command_buttons()
|
1934
1765
|
self.show_CW_macros()
|
1766
|
+
|
1767
|
+
# If bands list is empty fill it with HF.
|
1768
|
+
if self.pref.get("bands", []) == []:
|
1769
|
+
self.pref["bands"] = ["160", "80", "40", "20", "15", "10"]
|
1770
|
+
|
1771
|
+
# Hide all the bands and then show only the wanted bands.
|
1772
|
+
for _indicator in [
|
1773
|
+
self.band_indicators_cw,
|
1774
|
+
self.band_indicators_ssb,
|
1775
|
+
self.band_indicators_rtty,
|
1776
|
+
]:
|
1777
|
+
for _bandind in _indicator.values():
|
1778
|
+
_bandind.hide()
|
1779
|
+
for band_to_show in self.pref.get("bands", []):
|
1780
|
+
if band_to_show in _indicator:
|
1781
|
+
_indicator[band_to_show].show()
|
1935
1782
|
# self.show_band_mode()
|
1936
1783
|
|
1937
1784
|
def watch_udp(self) -> None:
|
@@ -2274,7 +2121,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
2274
2121
|
return result.get("isdupe", False)
|
2275
2122
|
|
2276
2123
|
def setmode(self, mode: str) -> None:
|
2277
|
-
"""
|
2124
|
+
"""Call when the mode changes."""
|
2278
2125
|
if mode == "CW":
|
2279
2126
|
if self.current_mode != "CW":
|
2280
2127
|
self.current_mode = "CW"
|
@@ -2330,7 +2177,10 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
2330
2177
|
destination_file.write_bytes(child.read_bytes())
|
2331
2178
|
|
2332
2179
|
def poll_radio(self) -> None:
|
2333
|
-
"""
|
2180
|
+
"""
|
2181
|
+
Poll radio for VFO, mode, bandwidth.
|
2182
|
+
Send state via multicast.
|
2183
|
+
"""
|
2334
2184
|
self.set_radio_icon(0)
|
2335
2185
|
if self.rig_control:
|
2336
2186
|
if self.rig_control.online is False:
|