not1mm 24.11.23__py3-none-any.whl → 24.11.24.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/data/donors.html +4 -0
- not1mm/lib/version.py +1 -1
- not1mm/plugins/10_10_fall_cw.py +91 -0
- not1mm/plugins/10_10_spring_cw.py +91 -0
- not1mm/plugins/10_10_summer_phone.py +91 -0
- not1mm/plugins/10_10_winter_phone.py +91 -0
- not1mm/plugins/arrl_10m.py +110 -0
- not1mm/plugins/arrl_vhf_jan.py +92 -1
- not1mm/plugins/arrl_vhf_jun.py +92 -1
- not1mm/plugins/arrl_vhf_sep.py +95 -1
- not1mm/plugins/cq_160_cw.py +94 -5
- not1mm/plugins/cq_160_ssb.py +94 -5
- not1mm/plugins/iaru_fieldday_r1_cw.py +91 -0
- not1mm/plugins/iaru_fieldday_r1_ssb.py +91 -0
- not1mm/plugins/iaru_hf.py +110 -0
- {not1mm-24.11.23.dist-info → not1mm-24.11.24.1.dist-info}/METADATA +26 -24
- {not1mm-24.11.23.dist-info → not1mm-24.11.24.1.dist-info}/RECORD +21 -21
- {not1mm-24.11.23.dist-info → not1mm-24.11.24.1.dist-info}/LICENSE +0 -0
- {not1mm-24.11.23.dist-info → not1mm-24.11.24.1.dist-info}/WHEEL +0 -0
- {not1mm-24.11.23.dist-info → not1mm-24.11.24.1.dist-info}/entry_points.txt +0 -0
- {not1mm-24.11.23.dist-info → not1mm-24.11.24.1.dist-info}/top_level.txt +0 -0
not1mm/plugins/arrl_vhf_jun.py
CHANGED
@@ -490,11 +490,102 @@ def ft8_handler(the_packet: dict):
|
|
490
490
|
ALTEREGO.save_contact()
|
491
491
|
|
492
492
|
|
493
|
+
def process_esm(self, new_focused_widget=None, with_enter=False):
|
494
|
+
"""ESM State Machine"""
|
495
|
+
|
496
|
+
# self.pref["run_state"]
|
497
|
+
|
498
|
+
# -----===== Assigned F-Keys =====-----
|
499
|
+
# self.esm_dict["CQ"]
|
500
|
+
# self.esm_dict["EXCH"]
|
501
|
+
# self.esm_dict["QRZ"]
|
502
|
+
# self.esm_dict["AGN"]
|
503
|
+
# self.esm_dict["HISCALL"]
|
504
|
+
# self.esm_dict["MYCALL"]
|
505
|
+
# self.esm_dict["QSOB4"]
|
506
|
+
|
507
|
+
# ----==== text fields ====----
|
508
|
+
# self.callsign
|
509
|
+
# self.sent
|
510
|
+
# self.receive
|
511
|
+
# self.other_1
|
512
|
+
# self.other_2
|
513
|
+
|
514
|
+
if new_focused_widget is not None:
|
515
|
+
self.current_widget = self.inputs_dict.get(new_focused_widget)
|
516
|
+
|
517
|
+
# print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}")
|
518
|
+
|
519
|
+
for a_button in [
|
520
|
+
self.esm_dict["CQ"],
|
521
|
+
self.esm_dict["EXCH"],
|
522
|
+
self.esm_dict["QRZ"],
|
523
|
+
self.esm_dict["AGN"],
|
524
|
+
self.esm_dict["HISCALL"],
|
525
|
+
self.esm_dict["MYCALL"],
|
526
|
+
self.esm_dict["QSOB4"],
|
527
|
+
]:
|
528
|
+
if a_button is not None:
|
529
|
+
self.restore_button_color(a_button)
|
530
|
+
|
531
|
+
buttons_to_send = []
|
532
|
+
|
533
|
+
if self.pref.get("run_state"):
|
534
|
+
if self.current_widget == "callsign":
|
535
|
+
if len(self.callsign.text()) < 3:
|
536
|
+
self.make_button_green(self.esm_dict["CQ"])
|
537
|
+
buttons_to_send.append(self.esm_dict["CQ"])
|
538
|
+
elif len(self.callsign.text()) > 2:
|
539
|
+
self.make_button_green(self.esm_dict["HISCALL"])
|
540
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
541
|
+
buttons_to_send.append(self.esm_dict["HISCALL"])
|
542
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
543
|
+
|
544
|
+
elif self.current_widget in ["other_2"]:
|
545
|
+
if self.other_2.text() == "":
|
546
|
+
self.make_button_green(self.esm_dict["AGN"])
|
547
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
548
|
+
else:
|
549
|
+
self.make_button_green(self.esm_dict["QRZ"])
|
550
|
+
buttons_to_send.append(self.esm_dict["QRZ"])
|
551
|
+
buttons_to_send.append("LOGIT")
|
552
|
+
|
553
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
554
|
+
for button in buttons_to_send:
|
555
|
+
if button:
|
556
|
+
if button == "LOGIT":
|
557
|
+
self.save_contact()
|
558
|
+
continue
|
559
|
+
self.process_function_key(button)
|
560
|
+
else:
|
561
|
+
if self.current_widget == "callsign":
|
562
|
+
if len(self.callsign.text()) > 2:
|
563
|
+
self.make_button_green(self.esm_dict["MYCALL"])
|
564
|
+
buttons_to_send.append(self.esm_dict["MYCALL"])
|
565
|
+
|
566
|
+
elif self.current_widget in ["other_2"]:
|
567
|
+
if self.other_2.text() == "":
|
568
|
+
self.make_button_green(self.esm_dict["AGN"])
|
569
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
570
|
+
else:
|
571
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
572
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
573
|
+
buttons_to_send.append("LOGIT")
|
574
|
+
|
575
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
576
|
+
for button in buttons_to_send:
|
577
|
+
if button:
|
578
|
+
if button == "LOGIT":
|
579
|
+
self.save_contact()
|
580
|
+
continue
|
581
|
+
self.process_function_key(button)
|
582
|
+
|
583
|
+
|
493
584
|
def populate_history_info_line(self):
|
494
585
|
result = self.database.fetch_call_history(self.callsign.text())
|
495
586
|
if result:
|
496
587
|
self.history_info.setText(
|
497
|
-
f"{result.get('Call', '')}, {result.get('Loc1', '')}, {result.get('UserText','...')}"
|
588
|
+
f"{result.get('Call', '')}, {result.get('Name', '')}, {result.get('Loc1', '')}, {result.get('UserText','...')}"
|
498
589
|
)
|
499
590
|
else:
|
500
591
|
self.history_info.setText("")
|
not1mm/plugins/arrl_vhf_sep.py
CHANGED
@@ -490,11 +490,102 @@ def ft8_handler(the_packet: dict):
|
|
490
490
|
ALTEREGO.save_contact()
|
491
491
|
|
492
492
|
|
493
|
+
def process_esm(self, new_focused_widget=None, with_enter=False):
|
494
|
+
"""ESM State Machine"""
|
495
|
+
|
496
|
+
# self.pref["run_state"]
|
497
|
+
|
498
|
+
# -----===== Assigned F-Keys =====-----
|
499
|
+
# self.esm_dict["CQ"]
|
500
|
+
# self.esm_dict["EXCH"]
|
501
|
+
# self.esm_dict["QRZ"]
|
502
|
+
# self.esm_dict["AGN"]
|
503
|
+
# self.esm_dict["HISCALL"]
|
504
|
+
# self.esm_dict["MYCALL"]
|
505
|
+
# self.esm_dict["QSOB4"]
|
506
|
+
|
507
|
+
# ----==== text fields ====----
|
508
|
+
# self.callsign
|
509
|
+
# self.sent
|
510
|
+
# self.receive
|
511
|
+
# self.other_1
|
512
|
+
# self.other_2
|
513
|
+
|
514
|
+
if new_focused_widget is not None:
|
515
|
+
self.current_widget = self.inputs_dict.get(new_focused_widget)
|
516
|
+
|
517
|
+
# print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}")
|
518
|
+
|
519
|
+
for a_button in [
|
520
|
+
self.esm_dict["CQ"],
|
521
|
+
self.esm_dict["EXCH"],
|
522
|
+
self.esm_dict["QRZ"],
|
523
|
+
self.esm_dict["AGN"],
|
524
|
+
self.esm_dict["HISCALL"],
|
525
|
+
self.esm_dict["MYCALL"],
|
526
|
+
self.esm_dict["QSOB4"],
|
527
|
+
]:
|
528
|
+
if a_button is not None:
|
529
|
+
self.restore_button_color(a_button)
|
530
|
+
|
531
|
+
buttons_to_send = []
|
532
|
+
|
533
|
+
if self.pref.get("run_state"):
|
534
|
+
if self.current_widget == "callsign":
|
535
|
+
if len(self.callsign.text()) < 3:
|
536
|
+
self.make_button_green(self.esm_dict["CQ"])
|
537
|
+
buttons_to_send.append(self.esm_dict["CQ"])
|
538
|
+
elif len(self.callsign.text()) > 2:
|
539
|
+
self.make_button_green(self.esm_dict["HISCALL"])
|
540
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
541
|
+
buttons_to_send.append(self.esm_dict["HISCALL"])
|
542
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
543
|
+
|
544
|
+
elif self.current_widget in ["other_2"]:
|
545
|
+
if self.other_2.text() == "":
|
546
|
+
self.make_button_green(self.esm_dict["AGN"])
|
547
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
548
|
+
else:
|
549
|
+
self.make_button_green(self.esm_dict["QRZ"])
|
550
|
+
buttons_to_send.append(self.esm_dict["QRZ"])
|
551
|
+
buttons_to_send.append("LOGIT")
|
552
|
+
|
553
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
554
|
+
for button in buttons_to_send:
|
555
|
+
if button:
|
556
|
+
if button == "LOGIT":
|
557
|
+
self.save_contact()
|
558
|
+
continue
|
559
|
+
self.process_function_key(button)
|
560
|
+
else:
|
561
|
+
if self.current_widget == "callsign":
|
562
|
+
if len(self.callsign.text()) > 2:
|
563
|
+
self.make_button_green(self.esm_dict["MYCALL"])
|
564
|
+
buttons_to_send.append(self.esm_dict["MYCALL"])
|
565
|
+
|
566
|
+
elif self.current_widget in ["other_2"]:
|
567
|
+
if self.other_2.text() == "":
|
568
|
+
self.make_button_green(self.esm_dict["AGN"])
|
569
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
570
|
+
else:
|
571
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
572
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
573
|
+
buttons_to_send.append("LOGIT")
|
574
|
+
|
575
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
576
|
+
for button in buttons_to_send:
|
577
|
+
if button:
|
578
|
+
if button == "LOGIT":
|
579
|
+
self.save_contact()
|
580
|
+
continue
|
581
|
+
self.process_function_key(button)
|
582
|
+
|
583
|
+
|
493
584
|
def populate_history_info_line(self):
|
494
585
|
result = self.database.fetch_call_history(self.callsign.text())
|
495
586
|
if result:
|
496
587
|
self.history_info.setText(
|
497
|
-
f"{result.get('Call', '')}, {result.get('Loc1', '')}, {result.get('UserText','...')}"
|
588
|
+
f"{result.get('Call', '')}, {result.get('Name', '')}, {result.get('Loc1', '')}, {result.get('UserText','...')}"
|
498
589
|
)
|
499
590
|
else:
|
500
591
|
self.history_info.setText("")
|
@@ -507,3 +598,6 @@ def check_call_history(self):
|
|
507
598
|
self.history_info.setText(f"{result.get('UserText','')}")
|
508
599
|
if self.other_2.text() == "":
|
509
600
|
self.other_2.setText(f"{result.get('Loc1', '')}")
|
601
|
+
|
602
|
+
|
603
|
+
# !!Order!!,Call,Name,Loc1,UserText,
|
not1mm/plugins/cq_160_cw.py
CHANGED
@@ -436,11 +436,102 @@ def recalculate_mults(self):
|
|
436
436
|
trigger_update(self)
|
437
437
|
|
438
438
|
|
439
|
+
def process_esm(self, new_focused_widget=None, with_enter=False):
|
440
|
+
"""ESM State Machine"""
|
441
|
+
|
442
|
+
# self.pref["run_state"]
|
443
|
+
|
444
|
+
# -----===== Assigned F-Keys =====-----
|
445
|
+
# self.esm_dict["CQ"]
|
446
|
+
# self.esm_dict["EXCH"]
|
447
|
+
# self.esm_dict["QRZ"]
|
448
|
+
# self.esm_dict["AGN"]
|
449
|
+
# self.esm_dict["HISCALL"]
|
450
|
+
# self.esm_dict["MYCALL"]
|
451
|
+
# self.esm_dict["QSOB4"]
|
452
|
+
|
453
|
+
# ----==== text fields ====----
|
454
|
+
# self.callsign
|
455
|
+
# self.sent
|
456
|
+
# self.receive
|
457
|
+
# self.other_1
|
458
|
+
# self.other_2
|
459
|
+
|
460
|
+
if new_focused_widget is not None:
|
461
|
+
self.current_widget = self.inputs_dict.get(new_focused_widget)
|
462
|
+
|
463
|
+
# print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}")
|
464
|
+
|
465
|
+
for a_button in [
|
466
|
+
self.esm_dict["CQ"],
|
467
|
+
self.esm_dict["EXCH"],
|
468
|
+
self.esm_dict["QRZ"],
|
469
|
+
self.esm_dict["AGN"],
|
470
|
+
self.esm_dict["HISCALL"],
|
471
|
+
self.esm_dict["MYCALL"],
|
472
|
+
self.esm_dict["QSOB4"],
|
473
|
+
]:
|
474
|
+
if a_button is not None:
|
475
|
+
self.restore_button_color(a_button)
|
476
|
+
|
477
|
+
buttons_to_send = []
|
478
|
+
|
479
|
+
if self.pref.get("run_state"):
|
480
|
+
if self.current_widget == "callsign":
|
481
|
+
if len(self.callsign.text()) < 3:
|
482
|
+
self.make_button_green(self.esm_dict["CQ"])
|
483
|
+
buttons_to_send.append(self.esm_dict["CQ"])
|
484
|
+
elif len(self.callsign.text()) > 2:
|
485
|
+
self.make_button_green(self.esm_dict["HISCALL"])
|
486
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
487
|
+
buttons_to_send.append(self.esm_dict["HISCALL"])
|
488
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
489
|
+
|
490
|
+
elif self.current_widget in ["other_2"]:
|
491
|
+
if self.other_2.text() == "":
|
492
|
+
self.make_button_green(self.esm_dict["AGN"])
|
493
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
494
|
+
else:
|
495
|
+
self.make_button_green(self.esm_dict["QRZ"])
|
496
|
+
buttons_to_send.append(self.esm_dict["QRZ"])
|
497
|
+
buttons_to_send.append("LOGIT")
|
498
|
+
|
499
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
500
|
+
for button in buttons_to_send:
|
501
|
+
if button:
|
502
|
+
if button == "LOGIT":
|
503
|
+
self.save_contact()
|
504
|
+
continue
|
505
|
+
self.process_function_key(button)
|
506
|
+
else:
|
507
|
+
if self.current_widget == "callsign":
|
508
|
+
if len(self.callsign.text()) > 2:
|
509
|
+
self.make_button_green(self.esm_dict["MYCALL"])
|
510
|
+
buttons_to_send.append(self.esm_dict["MYCALL"])
|
511
|
+
|
512
|
+
elif self.current_widget in ["other_2"]:
|
513
|
+
if self.other_2.text() == "":
|
514
|
+
self.make_button_green(self.esm_dict["AGN"])
|
515
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
516
|
+
else:
|
517
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
518
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
519
|
+
buttons_to_send.append("LOGIT")
|
520
|
+
|
521
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
522
|
+
for button in buttons_to_send:
|
523
|
+
if button:
|
524
|
+
if button == "LOGIT":
|
525
|
+
self.save_contact()
|
526
|
+
continue
|
527
|
+
self.process_function_key(button)
|
528
|
+
|
529
|
+
|
439
530
|
def populate_history_info_line(self):
|
440
531
|
result = self.database.fetch_call_history(self.callsign.text())
|
441
532
|
if result:
|
442
533
|
self.history_info.setText(
|
443
|
-
f"{result.get('Call', '')}, {result.get('UserText','...')}"
|
534
|
+
f"{result.get('Call', '')}, {result.get('Name', '')}, {result.get('State', '')}, {result.get('UserText','...')}"
|
444
535
|
)
|
445
536
|
else:
|
446
537
|
self.history_info.setText("")
|
@@ -451,7 +542,5 @@ def check_call_history(self):
|
|
451
542
|
result = self.database.fetch_call_history(self.callsign.text())
|
452
543
|
if result:
|
453
544
|
self.history_info.setText(f"{result.get('UserText','')}")
|
454
|
-
|
455
|
-
|
456
|
-
# if self.other_2.text() == "":
|
457
|
-
# self.other_2.setText(f"{result.get('State', '')}")
|
545
|
+
if self.other_2.text() == "":
|
546
|
+
self.other_2.setText(f"{result.get('State', '')}")
|
not1mm/plugins/cq_160_ssb.py
CHANGED
@@ -436,11 +436,102 @@ def recalculate_mults(self):
|
|
436
436
|
trigger_update(self)
|
437
437
|
|
438
438
|
|
439
|
+
def process_esm(self, new_focused_widget=None, with_enter=False):
|
440
|
+
"""ESM State Machine"""
|
441
|
+
|
442
|
+
# self.pref["run_state"]
|
443
|
+
|
444
|
+
# -----===== Assigned F-Keys =====-----
|
445
|
+
# self.esm_dict["CQ"]
|
446
|
+
# self.esm_dict["EXCH"]
|
447
|
+
# self.esm_dict["QRZ"]
|
448
|
+
# self.esm_dict["AGN"]
|
449
|
+
# self.esm_dict["HISCALL"]
|
450
|
+
# self.esm_dict["MYCALL"]
|
451
|
+
# self.esm_dict["QSOB4"]
|
452
|
+
|
453
|
+
# ----==== text fields ====----
|
454
|
+
# self.callsign
|
455
|
+
# self.sent
|
456
|
+
# self.receive
|
457
|
+
# self.other_1
|
458
|
+
# self.other_2
|
459
|
+
|
460
|
+
if new_focused_widget is not None:
|
461
|
+
self.current_widget = self.inputs_dict.get(new_focused_widget)
|
462
|
+
|
463
|
+
# print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}")
|
464
|
+
|
465
|
+
for a_button in [
|
466
|
+
self.esm_dict["CQ"],
|
467
|
+
self.esm_dict["EXCH"],
|
468
|
+
self.esm_dict["QRZ"],
|
469
|
+
self.esm_dict["AGN"],
|
470
|
+
self.esm_dict["HISCALL"],
|
471
|
+
self.esm_dict["MYCALL"],
|
472
|
+
self.esm_dict["QSOB4"],
|
473
|
+
]:
|
474
|
+
if a_button is not None:
|
475
|
+
self.restore_button_color(a_button)
|
476
|
+
|
477
|
+
buttons_to_send = []
|
478
|
+
|
479
|
+
if self.pref.get("run_state"):
|
480
|
+
if self.current_widget == "callsign":
|
481
|
+
if len(self.callsign.text()) < 3:
|
482
|
+
self.make_button_green(self.esm_dict["CQ"])
|
483
|
+
buttons_to_send.append(self.esm_dict["CQ"])
|
484
|
+
elif len(self.callsign.text()) > 2:
|
485
|
+
self.make_button_green(self.esm_dict["HISCALL"])
|
486
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
487
|
+
buttons_to_send.append(self.esm_dict["HISCALL"])
|
488
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
489
|
+
|
490
|
+
elif self.current_widget in ["other_2"]:
|
491
|
+
if self.other_2.text() == "":
|
492
|
+
self.make_button_green(self.esm_dict["AGN"])
|
493
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
494
|
+
else:
|
495
|
+
self.make_button_green(self.esm_dict["QRZ"])
|
496
|
+
buttons_to_send.append(self.esm_dict["QRZ"])
|
497
|
+
buttons_to_send.append("LOGIT")
|
498
|
+
|
499
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
500
|
+
for button in buttons_to_send:
|
501
|
+
if button:
|
502
|
+
if button == "LOGIT":
|
503
|
+
self.save_contact()
|
504
|
+
continue
|
505
|
+
self.process_function_key(button)
|
506
|
+
else:
|
507
|
+
if self.current_widget == "callsign":
|
508
|
+
if len(self.callsign.text()) > 2:
|
509
|
+
self.make_button_green(self.esm_dict["MYCALL"])
|
510
|
+
buttons_to_send.append(self.esm_dict["MYCALL"])
|
511
|
+
|
512
|
+
elif self.current_widget in ["other_2"]:
|
513
|
+
if self.other_2.text() == "":
|
514
|
+
self.make_button_green(self.esm_dict["AGN"])
|
515
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
516
|
+
else:
|
517
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
518
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
519
|
+
buttons_to_send.append("LOGIT")
|
520
|
+
|
521
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
522
|
+
for button in buttons_to_send:
|
523
|
+
if button:
|
524
|
+
if button == "LOGIT":
|
525
|
+
self.save_contact()
|
526
|
+
continue
|
527
|
+
self.process_function_key(button)
|
528
|
+
|
529
|
+
|
439
530
|
def populate_history_info_line(self):
|
440
531
|
result = self.database.fetch_call_history(self.callsign.text())
|
441
532
|
if result:
|
442
533
|
self.history_info.setText(
|
443
|
-
f"{result.get('Call', '')}, {result.get('UserText','...')}"
|
534
|
+
f"{result.get('Call', '')}, {result.get('Name', '')}, {result.get('State', '')}, {result.get('UserText','...')}"
|
444
535
|
)
|
445
536
|
else:
|
446
537
|
self.history_info.setText("")
|
@@ -451,7 +542,5 @@ def check_call_history(self):
|
|
451
542
|
result = self.database.fetch_call_history(self.callsign.text())
|
452
543
|
if result:
|
453
544
|
self.history_info.setText(f"{result.get('UserText','')}")
|
454
|
-
|
455
|
-
|
456
|
-
# if self.other_2.text() == "":
|
457
|
-
# self.other_2.setText(f"{result.get('State', '')}")
|
545
|
+
if self.other_2.text() == "":
|
546
|
+
self.other_2.setText(f"{result.get('State', '')}")
|
@@ -433,3 +433,94 @@ def recalculate_mults(self):
|
|
433
433
|
else:
|
434
434
|
contact["IsMultiplier1"] = 0
|
435
435
|
self.database.change_contact(contact)
|
436
|
+
|
437
|
+
|
438
|
+
def process_esm(self, new_focused_widget=None, with_enter=False):
|
439
|
+
"""ESM State Machine"""
|
440
|
+
|
441
|
+
# self.pref["run_state"]
|
442
|
+
|
443
|
+
# -----===== Assigned F-Keys =====-----
|
444
|
+
# self.esm_dict["CQ"]
|
445
|
+
# self.esm_dict["EXCH"]
|
446
|
+
# self.esm_dict["QRZ"]
|
447
|
+
# self.esm_dict["AGN"]
|
448
|
+
# self.esm_dict["HISCALL"]
|
449
|
+
# self.esm_dict["MYCALL"]
|
450
|
+
# self.esm_dict["QSOB4"]
|
451
|
+
|
452
|
+
# ----==== text fields ====----
|
453
|
+
# self.callsign
|
454
|
+
# self.sent
|
455
|
+
# self.receive
|
456
|
+
# self.other_1
|
457
|
+
# self.other_2
|
458
|
+
|
459
|
+
if new_focused_widget is not None:
|
460
|
+
self.current_widget = self.inputs_dict.get(new_focused_widget)
|
461
|
+
|
462
|
+
# print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}")
|
463
|
+
|
464
|
+
for a_button in [
|
465
|
+
self.esm_dict["CQ"],
|
466
|
+
self.esm_dict["EXCH"],
|
467
|
+
self.esm_dict["QRZ"],
|
468
|
+
self.esm_dict["AGN"],
|
469
|
+
self.esm_dict["HISCALL"],
|
470
|
+
self.esm_dict["MYCALL"],
|
471
|
+
self.esm_dict["QSOB4"],
|
472
|
+
]:
|
473
|
+
if a_button is not None:
|
474
|
+
self.restore_button_color(a_button)
|
475
|
+
|
476
|
+
buttons_to_send = []
|
477
|
+
|
478
|
+
if self.pref.get("run_state"):
|
479
|
+
if self.current_widget == "callsign":
|
480
|
+
if len(self.callsign.text()) < 3:
|
481
|
+
self.make_button_green(self.esm_dict["CQ"])
|
482
|
+
buttons_to_send.append(self.esm_dict["CQ"])
|
483
|
+
elif len(self.callsign.text()) > 2:
|
484
|
+
self.make_button_green(self.esm_dict["HISCALL"])
|
485
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
486
|
+
buttons_to_send.append(self.esm_dict["HISCALL"])
|
487
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
488
|
+
|
489
|
+
elif self.current_widget in ["other_2"]:
|
490
|
+
if self.other_2.text() == "":
|
491
|
+
self.make_button_green(self.esm_dict["AGN"])
|
492
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
493
|
+
else:
|
494
|
+
self.make_button_green(self.esm_dict["QRZ"])
|
495
|
+
buttons_to_send.append(self.esm_dict["QRZ"])
|
496
|
+
buttons_to_send.append("LOGIT")
|
497
|
+
|
498
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
499
|
+
for button in buttons_to_send:
|
500
|
+
if button:
|
501
|
+
if button == "LOGIT":
|
502
|
+
self.save_contact()
|
503
|
+
continue
|
504
|
+
self.process_function_key(button)
|
505
|
+
else:
|
506
|
+
if self.current_widget == "callsign":
|
507
|
+
if len(self.callsign.text()) > 2:
|
508
|
+
self.make_button_green(self.esm_dict["MYCALL"])
|
509
|
+
buttons_to_send.append(self.esm_dict["MYCALL"])
|
510
|
+
|
511
|
+
elif self.current_widget in ["other_2"]:
|
512
|
+
if self.other_2.text() == "":
|
513
|
+
self.make_button_green(self.esm_dict["AGN"])
|
514
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
515
|
+
else:
|
516
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
517
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
518
|
+
buttons_to_send.append("LOGIT")
|
519
|
+
|
520
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
521
|
+
for button in buttons_to_send:
|
522
|
+
if button:
|
523
|
+
if button == "LOGIT":
|
524
|
+
self.save_contact()
|
525
|
+
continue
|
526
|
+
self.process_function_key(button)
|
@@ -433,3 +433,94 @@ def recalculate_mults(self):
|
|
433
433
|
else:
|
434
434
|
contact["IsMultiplier1"] = 0
|
435
435
|
self.database.change_contact(contact)
|
436
|
+
|
437
|
+
|
438
|
+
def process_esm(self, new_focused_widget=None, with_enter=False):
|
439
|
+
"""ESM State Machine"""
|
440
|
+
|
441
|
+
# self.pref["run_state"]
|
442
|
+
|
443
|
+
# -----===== Assigned F-Keys =====-----
|
444
|
+
# self.esm_dict["CQ"]
|
445
|
+
# self.esm_dict["EXCH"]
|
446
|
+
# self.esm_dict["QRZ"]
|
447
|
+
# self.esm_dict["AGN"]
|
448
|
+
# self.esm_dict["HISCALL"]
|
449
|
+
# self.esm_dict["MYCALL"]
|
450
|
+
# self.esm_dict["QSOB4"]
|
451
|
+
|
452
|
+
# ----==== text fields ====----
|
453
|
+
# self.callsign
|
454
|
+
# self.sent
|
455
|
+
# self.receive
|
456
|
+
# self.other_1
|
457
|
+
# self.other_2
|
458
|
+
|
459
|
+
if new_focused_widget is not None:
|
460
|
+
self.current_widget = self.inputs_dict.get(new_focused_widget)
|
461
|
+
|
462
|
+
# print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}")
|
463
|
+
|
464
|
+
for a_button in [
|
465
|
+
self.esm_dict["CQ"],
|
466
|
+
self.esm_dict["EXCH"],
|
467
|
+
self.esm_dict["QRZ"],
|
468
|
+
self.esm_dict["AGN"],
|
469
|
+
self.esm_dict["HISCALL"],
|
470
|
+
self.esm_dict["MYCALL"],
|
471
|
+
self.esm_dict["QSOB4"],
|
472
|
+
]:
|
473
|
+
if a_button is not None:
|
474
|
+
self.restore_button_color(a_button)
|
475
|
+
|
476
|
+
buttons_to_send = []
|
477
|
+
|
478
|
+
if self.pref.get("run_state"):
|
479
|
+
if self.current_widget == "callsign":
|
480
|
+
if len(self.callsign.text()) < 3:
|
481
|
+
self.make_button_green(self.esm_dict["CQ"])
|
482
|
+
buttons_to_send.append(self.esm_dict["CQ"])
|
483
|
+
elif len(self.callsign.text()) > 2:
|
484
|
+
self.make_button_green(self.esm_dict["HISCALL"])
|
485
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
486
|
+
buttons_to_send.append(self.esm_dict["HISCALL"])
|
487
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
488
|
+
|
489
|
+
elif self.current_widget in ["other_2"]:
|
490
|
+
if self.other_2.text() == "":
|
491
|
+
self.make_button_green(self.esm_dict["AGN"])
|
492
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
493
|
+
else:
|
494
|
+
self.make_button_green(self.esm_dict["QRZ"])
|
495
|
+
buttons_to_send.append(self.esm_dict["QRZ"])
|
496
|
+
buttons_to_send.append("LOGIT")
|
497
|
+
|
498
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
499
|
+
for button in buttons_to_send:
|
500
|
+
if button:
|
501
|
+
if button == "LOGIT":
|
502
|
+
self.save_contact()
|
503
|
+
continue
|
504
|
+
self.process_function_key(button)
|
505
|
+
else:
|
506
|
+
if self.current_widget == "callsign":
|
507
|
+
if len(self.callsign.text()) > 2:
|
508
|
+
self.make_button_green(self.esm_dict["MYCALL"])
|
509
|
+
buttons_to_send.append(self.esm_dict["MYCALL"])
|
510
|
+
|
511
|
+
elif self.current_widget in ["other_2"]:
|
512
|
+
if self.other_2.text() == "":
|
513
|
+
self.make_button_green(self.esm_dict["AGN"])
|
514
|
+
buttons_to_send.append(self.esm_dict["AGN"])
|
515
|
+
else:
|
516
|
+
self.make_button_green(self.esm_dict["EXCH"])
|
517
|
+
buttons_to_send.append(self.esm_dict["EXCH"])
|
518
|
+
buttons_to_send.append("LOGIT")
|
519
|
+
|
520
|
+
if with_enter is True and bool(len(buttons_to_send)):
|
521
|
+
for button in buttons_to_send:
|
522
|
+
if button:
|
523
|
+
if button == "LOGIT":
|
524
|
+
self.save_contact()
|
525
|
+
continue
|
526
|
+
self.process_function_key(button)
|