not1mm 24.10.14__py3-none-any.whl → 24.10.15.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.
@@ -352,6 +352,11 @@
352
352
  <string>NAQP CW</string>
353
353
  </property>
354
354
  </item>
355
+ <item>
356
+ <property name="text">
357
+ <string>NAQP RTTY</string>
358
+ </property>
359
+ </item>
355
360
  <item>
356
361
  <property name="text">
357
362
  <string>NAQP SSB</string>
not1mm/lib/version.py CHANGED
@@ -1,3 +1,3 @@
1
1
  """It's the version"""
2
2
 
3
- __version__ = "24.10.14"
3
+ __version__ = "24.10.15.1"
@@ -480,7 +480,10 @@ def process_esm(self, new_focused_widget=None, with_enter=False):
480
480
  if len(self.callsign.text()) < 3:
481
481
  self.make_button_green(self.esm_dict["CQ"])
482
482
  buttons_to_send.append(self.esm_dict["CQ"])
483
- elif len(self.callsign.text()) > 2 and self.callsign.text().isalnum():
483
+ elif (
484
+ len(self.callsign.text()) > 2
485
+ and self.callsign.text().replace("/", "").isalnum()
486
+ ):
484
487
  self.make_button_green(self.esm_dict["HISCALL"])
485
488
  self.make_button_green(self.esm_dict["EXCH"])
486
489
  buttons_to_send.append(self.esm_dict["HISCALL"])
@@ -507,7 +510,10 @@ def process_esm(self, new_focused_widget=None, with_enter=False):
507
510
  self.process_function_key(button)
508
511
  else:
509
512
  if self.current_widget == "callsign":
510
- if len(self.callsign.text()) > 2 and self.callsign.text().isalnum():
513
+ if (
514
+ len(self.callsign.text()) > 2
515
+ and self.callsign.text().replace("/", "").isalnum()
516
+ ):
511
517
  self.make_button_green(self.esm_dict["MYCALL"])
512
518
  buttons_to_send.append(self.esm_dict["MYCALL"])
513
519
 
@@ -557,7 +557,10 @@ def process_esm(self, new_focused_widget=None, with_enter=False):
557
557
  if len(self.callsign.text()) < 3:
558
558
  self.make_button_green(self.esm_dict["CQ"])
559
559
  buttons_to_send.append(self.esm_dict["CQ"])
560
- elif len(self.callsign.text()) > 2 and self.callsign.text().isalnum():
560
+ elif (
561
+ len(self.callsign.text()) > 2
562
+ and self.callsign.text().replace("/", "").isalnum()
563
+ ):
561
564
  self.make_button_green(self.esm_dict["HISCALL"])
562
565
  self.make_button_green(self.esm_dict["EXCH"])
563
566
  buttons_to_send.append(self.esm_dict["HISCALL"])
@@ -586,7 +589,10 @@ def process_esm(self, new_focused_widget=None, with_enter=False):
586
589
  self.fldigi_util.send_string(sendstring)
587
590
  else:
588
591
  if self.current_widget == "callsign":
589
- if len(self.callsign.text()) > 2 and self.callsign.text().isalnum():
592
+ if (
593
+ len(self.callsign.text()) > 2
594
+ and self.callsign.text().replace("/", "").isalnum()
595
+ ):
590
596
  self.make_button_green(self.esm_dict["MYCALL"])
591
597
  buttons_to_send.append(self.esm_dict["MYCALL"])
592
598
 
@@ -443,7 +443,10 @@ def process_esm(self, new_focused_widget=None, with_enter=False):
443
443
  if len(self.callsign.text()) < 3:
444
444
  self.make_button_green(self.esm_dict["CQ"])
445
445
  buttons_to_send.append(self.esm_dict["CQ"])
446
- elif len(self.callsign.text()) > 2 and self.callsign.text().isalnum():
446
+ elif (
447
+ len(self.callsign.text()) > 2
448
+ and self.callsign.text().replace("/", "").isalnum()
449
+ ):
447
450
  self.make_button_green(self.esm_dict["HISCALL"])
448
451
  self.make_button_green(self.esm_dict["EXCH"])
449
452
  buttons_to_send.append(self.esm_dict["HISCALL"])
@@ -470,7 +473,10 @@ def process_esm(self, new_focused_widget=None, with_enter=False):
470
473
  self.process_function_key(button)
471
474
  else:
472
475
  if self.current_widget == "callsign":
473
- if len(self.callsign.text()) > 2 and self.callsign.text().isalnum():
476
+ if (
477
+ len(self.callsign.text()) > 2
478
+ and self.callsign.text().replace("/", "").isalnum()
479
+ ):
474
480
  self.make_button_green(self.esm_dict["MYCALL"])
475
481
  buttons_to_send.append(self.esm_dict["MYCALL"])
476
482
 
@@ -431,7 +431,10 @@ def process_esm(self, new_focused_widget=None, with_enter=False):
431
431
  if len(self.callsign.text()) < 3:
432
432
  self.make_button_green(self.esm_dict["CQ"])
433
433
  buttons_to_send.append(self.esm_dict["CQ"])
434
- elif len(self.callsign.text()) > 2 and self.callsign.text().isalnum():
434
+ elif (
435
+ len(self.callsign.text()) > 2
436
+ and self.callsign.text().replace("/", "").isalnum()
437
+ ):
435
438
  self.make_button_green(self.esm_dict["HISCALL"])
436
439
  self.make_button_green(self.esm_dict["EXCH"])
437
440
  buttons_to_send.append(self.esm_dict["HISCALL"])
@@ -458,7 +461,10 @@ def process_esm(self, new_focused_widget=None, with_enter=False):
458
461
  self.process_function_key(button)
459
462
  else:
460
463
  if self.current_widget == "callsign":
461
- if len(self.callsign.text()) > 2 and self.callsign.text().isalnum():
464
+ if (
465
+ len(self.callsign.text()) > 2
466
+ and self.callsign.text().replace("/", "").isalnum()
467
+ ):
462
468
  self.make_button_green(self.esm_dict["MYCALL"])
463
469
  buttons_to_send.append(self.esm_dict["MYCALL"])
464
470
 
@@ -546,7 +546,10 @@ def process_esm(self, new_focused_widget=None, with_enter=False):
546
546
  if len(self.callsign.text()) < 3:
547
547
  self.make_button_green(self.esm_dict["CQ"])
548
548
  buttons_to_send.append(self.esm_dict["CQ"])
549
- elif len(self.callsign.text()) > 2 and self.callsign.text().isalnum():
549
+ elif (
550
+ len(self.callsign.text()) > 2
551
+ and self.callsign.text().replace("/", "").isalnum()
552
+ ):
550
553
  self.make_button_green(self.esm_dict["HISCALL"])
551
554
  self.make_button_green(self.esm_dict["EXCH"])
552
555
  buttons_to_send.append(self.esm_dict["HISCALL"])
@@ -575,7 +578,10 @@ def process_esm(self, new_focused_widget=None, with_enter=False):
575
578
  self.fldigi_util.send_string(sendstring)
576
579
  else:
577
580
  if self.current_widget == "callsign":
578
- if len(self.callsign.text()) > 2 and self.callsign.text().isalnum():
581
+ if (
582
+ len(self.callsign.text()) > 2
583
+ and self.callsign.text().replace("/", "").isalnum()
584
+ ):
579
585
  self.make_button_green(self.esm_dict["MYCALL"])
580
586
  buttons_to_send.append(self.esm_dict["MYCALL"])
581
587
 
@@ -429,7 +429,10 @@ def process_esm(self, new_focused_widget=None, with_enter=False):
429
429
  if len(self.callsign.text()) < 3:
430
430
  self.make_button_green(self.esm_dict["CQ"])
431
431
  buttons_to_send.append(self.esm_dict["CQ"])
432
- elif len(self.callsign.text()) > 2 and self.callsign.text().isalnum():
432
+ elif (
433
+ len(self.callsign.text()) > 2
434
+ and self.callsign.text().replace("/", "").isalnum()
435
+ ):
433
436
  self.make_button_green(self.esm_dict["HISCALL"])
434
437
  self.make_button_green(self.esm_dict["EXCH"])
435
438
  buttons_to_send.append(self.esm_dict["HISCALL"])
@@ -456,7 +459,10 @@ def process_esm(self, new_focused_widget=None, with_enter=False):
456
459
  self.process_function_key(button)
457
460
  else:
458
461
  if self.current_widget == "callsign":
459
- if len(self.callsign.text()) > 2 and self.callsign.text().isalnum():
462
+ if (
463
+ len(self.callsign.text()) > 2
464
+ and self.callsign.text().replace("/", "").isalnum()
465
+ ):
460
466
  self.make_button_green(self.esm_dict["MYCALL"])
461
467
  buttons_to_send.append(self.esm_dict["MYCALL"])
462
468
 
not1mm/plugins/cwt.py CHANGED
@@ -441,7 +441,10 @@ def process_esm(self, new_focused_widget=None, with_enter=False):
441
441
  if len(self.callsign.text()) < 3:
442
442
  self.make_button_green(self.esm_dict["CQ"])
443
443
  buttons_to_send.append(self.esm_dict["CQ"])
444
- elif len(self.callsign.text()) > 2 and self.callsign.text().isalnum():
444
+ elif (
445
+ len(self.callsign.text()) > 2
446
+ and self.callsign.text().replace("/", "").isalnum()
447
+ ):
445
448
  self.make_button_green(self.esm_dict["HISCALL"])
446
449
  self.make_button_green(self.esm_dict["EXCH"])
447
450
  buttons_to_send.append(self.esm_dict["HISCALL"])
@@ -467,7 +470,10 @@ def process_esm(self, new_focused_widget=None, with_enter=False):
467
470
  self.process_function_key(button)
468
471
  else:
469
472
  if self.current_widget == "callsign":
470
- if len(self.callsign.text()) > 2 and self.callsign.text().isalnum():
473
+ if (
474
+ len(self.callsign.text()) > 2
475
+ and self.callsign.text().replace("/", "").isalnum()
476
+ ):
471
477
  self.make_button_green(self.esm_dict["MYCALL"])
472
478
  buttons_to_send.append(self.esm_dict["MYCALL"])
473
479
 
@@ -416,7 +416,10 @@ def process_esm(self, new_focused_widget=None, with_enter=False):
416
416
  if len(self.callsign.text()) < 3:
417
417
  self.make_button_green(self.esm_dict["CQ"])
418
418
  buttons_to_send.append(self.esm_dict["CQ"])
419
- elif len(self.callsign.text()) > 2 and self.callsign.text().isalnum():
419
+ elif (
420
+ len(self.callsign.text()) > 2
421
+ and self.callsign.text().replace("/", "").isalnum()
422
+ ):
420
423
  self.make_button_green(self.esm_dict["HISCALL"])
421
424
  self.make_button_green(self.esm_dict["EXCH"])
422
425
  buttons_to_send.append(self.esm_dict["HISCALL"])
@@ -442,7 +445,10 @@ def process_esm(self, new_focused_widget=None, with_enter=False):
442
445
  self.process_function_key(button)
443
446
  else:
444
447
  if self.current_widget == "callsign":
445
- if len(self.callsign.text()) > 2 and self.callsign.text().isalnum():
448
+ if (
449
+ len(self.callsign.text()) > 2
450
+ and self.callsign.text().replace("/", "").isalnum()
451
+ ):
446
452
  self.make_button_green(self.esm_dict["MYCALL"])
447
453
  buttons_to_send.append(self.esm_dict["MYCALL"])
448
454
 
not1mm/plugins/naqp_cw.py CHANGED
@@ -13,12 +13,12 @@
13
13
  # Single Op Assisted (QRP/Low)
14
14
  # Single Op Overlay: Youth
15
15
  # Multi-Two (Low)
16
- # Max operating hours: Single Op: 10 hours
17
- # Multi-Two: 12 hours
18
- # Max power: LP: 100 watts
19
- # QRP: 5 watts
20
- # Exchange: NA: Name + (state/DC/province/country)
21
- # non-NA: Name
16
+ # Max operating hours: Single Op: 10 hours
17
+ # Multi-Two: 12 hours
18
+ # Max power: LP: 100 watts
19
+ # QRP: 5 watts
20
+ # Exchange: NA: Name + (state/DC/province/country)
21
+ # non-NA: Name
22
22
  # Work stations: Once per band
23
23
  # QSO Points: NA station: 1 point per QSO
24
24
  # non-NA station: 1 point per QSO with an NA station
@@ -391,3 +391,135 @@ def recalculate_mults(self):
391
391
  cmd["cmd"] = "UPDATELOG"
392
392
  cmd["station"] = platform.node()
393
393
  self.multicast_interface.send_as_json(cmd)
394
+
395
+
396
+ def process_esm(self, new_focused_widget=None, with_enter=False):
397
+ """ESM State Machine"""
398
+
399
+ # self.pref["run_state"]
400
+
401
+ # -----===== Assigned F-Keys =====-----
402
+ # self.esm_dict["CQ"]
403
+ # self.esm_dict["EXCH"]
404
+ # self.esm_dict["QRZ"]
405
+ # self.esm_dict["AGN"]
406
+ # self.esm_dict["HISCALL"]
407
+ # self.esm_dict["MYCALL"]
408
+ # self.esm_dict["QSOB4"]
409
+
410
+ # ----==== text fields ====----
411
+ # self.callsign
412
+ # self.sent
413
+ # self.receive
414
+ # self.other_1
415
+ # self.other_2
416
+
417
+ if new_focused_widget is not None:
418
+ self.current_widget = self.inputs_dict.get(new_focused_widget)
419
+
420
+ # print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}")
421
+
422
+ for a_button in [
423
+ self.F1,
424
+ self.F2,
425
+ self.F3,
426
+ self.F4,
427
+ self.F5,
428
+ self.F6,
429
+ self.F7,
430
+ self.F8,
431
+ self.F9,
432
+ self.F10,
433
+ self.F11,
434
+ self.F12,
435
+ ]:
436
+ self.restore_button_color(a_button)
437
+
438
+ buttons_to_send = []
439
+
440
+ if self.pref.get("run_state"):
441
+ if self.current_widget == "callsign":
442
+ if len(self.callsign.text()) < 3:
443
+ self.make_button_green(self.esm_dict["CQ"])
444
+ buttons_to_send.append(self.esm_dict["CQ"])
445
+ elif (
446
+ len(self.callsign.text()) > 2
447
+ and self.callsign.text().replace("/", "").isalnum()
448
+ ):
449
+ self.make_button_green(self.esm_dict["HISCALL"])
450
+ self.make_button_green(self.esm_dict["EXCH"])
451
+ buttons_to_send.append(self.esm_dict["HISCALL"])
452
+ buttons_to_send.append(self.esm_dict["EXCH"])
453
+
454
+ elif self.current_widget == "other_1" or self.current_widget == "other_2":
455
+ continent = self.contact.get("Continent")
456
+ print(
457
+ f"{self.current_widget=} {self.other_1.text().isalpha()=} {self.other_2.text().isalpha()=} {continent=}"
458
+ )
459
+ if self.other_1.text() == "" or (
460
+ self.other_2.text() == "" and continent == "NA"
461
+ ):
462
+ self.make_button_green(self.esm_dict["AGN"])
463
+ buttons_to_send.append(self.esm_dict["AGN"])
464
+ elif (
465
+ self.other_1.text().isalpha()
466
+ and self.other_2.text().isalpha()
467
+ and continent == "NA"
468
+ ):
469
+ self.make_button_green(self.esm_dict["QRZ"])
470
+ buttons_to_send.append(self.esm_dict["QRZ"])
471
+ buttons_to_send.append("LOGIT")
472
+ elif self.other_1.text().isalpha() and continent != "NA":
473
+ self.make_button_green(self.esm_dict["QRZ"])
474
+ buttons_to_send.append(self.esm_dict["QRZ"])
475
+ buttons_to_send.append("LOGIT")
476
+ else:
477
+ self.make_button_green(self.esm_dict["AGN"])
478
+ buttons_to_send.append(self.esm_dict["AGN"])
479
+
480
+ if with_enter is True and bool(len(buttons_to_send)):
481
+ for button in buttons_to_send:
482
+ if button:
483
+ if button == "LOGIT":
484
+ self.save_contact()
485
+ continue
486
+ self.process_function_key(button)
487
+ else:
488
+ if self.current_widget == "callsign":
489
+ if (
490
+ len(self.callsign.text()) > 2
491
+ and self.callsign.text().replace("/", "").isalnum()
492
+ ):
493
+ self.make_button_green(self.esm_dict["MYCALL"])
494
+ buttons_to_send.append(self.esm_dict["MYCALL"])
495
+
496
+ elif self.current_widget == "other_1" or self.current_widget == "other_2":
497
+ continent = self.contact.get("Continent")
498
+ if self.other_1.text() == "" or (
499
+ self.other_2.text() == "" and continent == "NA"
500
+ ):
501
+ self.make_button_green(self.esm_dict["AGN"])
502
+ buttons_to_send.append(self.esm_dict["AGN"])
503
+ elif (
504
+ self.other_1.text().isalpha()
505
+ and self.other_2.text().isalpha()
506
+ and continent == "NA"
507
+ ):
508
+ self.make_button_green(self.esm_dict["EXCH"])
509
+ buttons_to_send.append(self.esm_dict["EXCH"])
510
+ buttons_to_send.append("LOGIT")
511
+ elif self.other_1.text().isalpha() and continent != "NA":
512
+ self.make_button_green(self.esm_dict["EXCH"])
513
+ buttons_to_send.append(self.esm_dict["EXCH"])
514
+ buttons_to_send.append("LOGIT")
515
+ else:
516
+ self.make_button_green(self.esm_dict["AGN"])
517
+ buttons_to_send.append(self.esm_dict["AGN"])
518
+
519
+ if with_enter is True and bool(len(buttons_to_send)):
520
+ for button in buttons_to_send:
521
+ if button:
522
+ if button == "LOGIT":
523
+ self.save_contact()
524
+ continue
525
+ self.process_function_key(button)
@@ -0,0 +1,634 @@
1
+ """NAQP RTTY plugin"""
2
+
3
+ # pylint: disable=invalid-name, unused-argument, unused-variable, c-extension-no-member, unused-import
4
+
5
+ # North American QSO Party, RTTY
6
+ # Status: Active
7
+ # Geographic Focus: North America
8
+ # Participation: Worldwide
9
+ # Awards: North America
10
+ # Mode: RTTY
11
+ # Bands: 160, 80, 40, 20, 15, 10m
12
+ # Classes: Single Op (QRP/Low)
13
+ # Single Op Assisted (QRP/Low)
14
+ # Single Op Overlay: Youth
15
+ # Multi-Two (Low)
16
+ # Max operating hours: Single Op: 10 hours
17
+ # Multi-Two: 12 hours
18
+ # Max power: LP: 100 watts
19
+ # QRP: 5 watts
20
+ # Exchange: NA: Name + (state/DC/province/country)
21
+ # non-NA: Name
22
+ # Work stations: Once per band
23
+ # QSO Points: NA station: 1 point per QSO
24
+ # non-NA station: 1 point per QSO with an NA station
25
+ # Multipliers: Each US state and DC (including KH6/KL7) once per band
26
+ # Each VE province/territory once per band
27
+ # Each North American country (except W/VE) once per band
28
+ # Score Calculation: Total score = total QSO points x total mults
29
+ # E-mail logs to: (none)
30
+ # Upload log at: http://www.ncjweb.com/naqplogsubmit/
31
+ # Mail logs to: (none)
32
+ # Find rules at: https://www.ncjweb.com/NAQP-Rules.pdf
33
+ # Cabrillo name: NAQP-RTTY
34
+
35
+ import datetime
36
+ import logging
37
+ import platform
38
+
39
+ from pathlib import Path
40
+
41
+ from PyQt6 import QtWidgets
42
+
43
+ from not1mm.lib.ham_utility import get_logged_band
44
+ from not1mm.lib.plugin_common import gen_adif, get_points
45
+ from not1mm.lib.version import __version__
46
+
47
+ logger = logging.getLogger(__name__)
48
+
49
+ EXCHANGE_HINT = "Name or Name + SPC"
50
+
51
+ ALTEREGO = None
52
+
53
+ name = "NAQP RTTY"
54
+ cabrillo_name = "NAQP-RTTY"
55
+ mode = "RTTY" # CW SSB BOTH RTTY
56
+ # columns = [0, 1, 2, 3, 4, 10, 11, 14, 15]
57
+ columns = [
58
+ "YYYY-MM-DD HH:MM:SS",
59
+ "Call",
60
+ "Freq",
61
+ "Name",
62
+ "Sect",
63
+ "M1",
64
+ "PTS",
65
+ ]
66
+
67
+ advance_on_space = [True, True, True, True, True]
68
+
69
+ # 1 once per contest, 2 work each band, 3 each band/mode, 4 no dupe checking
70
+ dupe_type = 2
71
+
72
+
73
+ def init_contest(self):
74
+ """setup plugin"""
75
+ set_tab_next(self)
76
+ set_tab_prev(self)
77
+ interface(self)
78
+ self.next_field = self.other_1
79
+
80
+
81
+ def interface(self):
82
+ """Setup user interface"""
83
+ self.field1.hide()
84
+ self.field2.hide()
85
+ self.field3.show()
86
+ self.field4.show()
87
+ self.snt_label.setText("SNT")
88
+ self.field1.setAccessibleName("RST Sent")
89
+ namefield = self.field3.findChild(QtWidgets.QLabel)
90
+ namefield.setText("Name")
91
+ self.field3.setAccessibleName("Name")
92
+ spc = self.field4.findChild(QtWidgets.QLabel)
93
+ spc.setText("State")
94
+ self.field4.setAccessibleName("State")
95
+
96
+
97
+ def reset_label(self):
98
+ """reset label after field cleared"""
99
+
100
+
101
+ def set_tab_next(self):
102
+ """Set TAB Advances"""
103
+ self.tab_next = {
104
+ self.callsign: self.field3.findChild(QtWidgets.QLineEdit),
105
+ self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild(
106
+ QtWidgets.QLineEdit
107
+ ),
108
+ self.field4.findChild(QtWidgets.QLineEdit): self.callsign,
109
+ }
110
+
111
+
112
+ def set_tab_prev(self):
113
+ """Set TAB Advances"""
114
+ self.tab_prev = {
115
+ self.callsign: self.field4.findChild(QtWidgets.QLineEdit),
116
+ self.field3.findChild(QtWidgets.QLineEdit): self.callsign,
117
+ self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild(
118
+ QtWidgets.QLineEdit
119
+ ),
120
+ }
121
+
122
+
123
+ def set_contact_vars(self):
124
+ """Contest Specific"""
125
+ self.contact["SNT"] = self.sent.text()
126
+ self.contact["RCV"] = self.receive.text()
127
+ self.contact["Name"] = self.other_1.text().upper()
128
+ self.contact["Sect"] = self.other_2.text().upper()
129
+ self.contact["SentNr"] = self.contest_settings.get("SentExchange", 0)
130
+
131
+ if self.contact.get("Sect", ""):
132
+ result = self.database.fetch_sect_band_exists(
133
+ self.contact.get("Sect", ""), self.contact.get("Band", "")
134
+ )
135
+ if result.get("sect_count", ""):
136
+ self.contact["IsMultiplier1"] = 0
137
+ else:
138
+ self.contact["IsMultiplier1"] = 1
139
+
140
+
141
+ def predupe(self):
142
+ """called after callsign entered"""
143
+
144
+
145
+ def prefill(self):
146
+ """Fill sentnr"""
147
+
148
+
149
+ def points(self):
150
+ """Calc point"""
151
+ mycontinent = ""
152
+ hiscontinent = ""
153
+ result = self.cty_lookup(self.station.get("Call", ""))
154
+ if result:
155
+ for item in result.items():
156
+ mycontinent = item[1].get("continent", "")
157
+ result = self.cty_lookup(self.contact.get("Call", ""))
158
+ if result:
159
+ for item in result.items():
160
+ hiscontinent = item[1].get("continent", "")
161
+ if mycontinent == "NA" or hiscontinent == "NA":
162
+ return 1
163
+ return 0
164
+
165
+
166
+ def show_mults(self):
167
+ """Return display string for mults"""
168
+ result = self.database.fetch_section_band_count_nodx()
169
+ if result:
170
+ return int(result.get("sb_count", 0))
171
+ return 0
172
+
173
+
174
+ def show_qso(self):
175
+ """Return qso count"""
176
+ result = self.database.fetch_qso_count()
177
+ if result:
178
+ return int(result.get("qsos", 0))
179
+ return 0
180
+
181
+
182
+ def calc_score(self):
183
+ """Return calculated score"""
184
+ result = self.database.fetch_points()
185
+ if result is not None:
186
+ score = result.get("Points", "0")
187
+ if score is None:
188
+ score = "0"
189
+ contest_points = int(score)
190
+ mults = show_mults(self)
191
+ return contest_points * mults
192
+ return 0
193
+
194
+
195
+ def adif(self):
196
+ """Call the generate ADIF function"""
197
+ gen_adif(self, cabrillo_name, "NAQP-RTTY")
198
+
199
+
200
+ def cabrillo(self):
201
+ """Generates Cabrillo file. Maybe."""
202
+ # https://www.cqwpx.com/cabrillo.htm
203
+ logger.debug("******Cabrillo*****")
204
+ logger.debug("Station: %s", f"{self.station}")
205
+ logger.debug("Contest: %s", f"{self.contest_settings}")
206
+ now = datetime.datetime.now()
207
+ date_time = now.strftime("%Y-%m-%d_%H-%M-%S")
208
+ filename = (
209
+ str(Path.home())
210
+ + "/"
211
+ + f"{self.station.get('Call', '').upper()}_{cabrillo_name}_{date_time}.log"
212
+ )
213
+ logger.debug("%s", filename)
214
+ log = self.database.fetch_all_contacts_asc()
215
+ try:
216
+ with open(filename, "w", encoding="ascii") as file_descriptor:
217
+ print("START-OF-LOG: 3.0", end="\r\n", file=file_descriptor)
218
+ print(
219
+ f"CREATED-BY: Not1MM v{__version__}",
220
+ end="\r\n",
221
+ file=file_descriptor,
222
+ )
223
+ print(
224
+ f"CONTEST: {cabrillo_name}",
225
+ end="\r\n",
226
+ file=file_descriptor,
227
+ )
228
+ if self.station.get("Club", ""):
229
+ print(
230
+ f"CLUB: {self.station.get('Club', '').upper()}",
231
+ end="\r\n",
232
+ file=file_descriptor,
233
+ )
234
+ print(
235
+ f"CALLSIGN: {self.station.get('Call','')}",
236
+ end="\r\n",
237
+ file=file_descriptor,
238
+ )
239
+ print(
240
+ f"LOCATION: {self.station.get('ARRLSection', '')}",
241
+ end="\r\n",
242
+ file=file_descriptor,
243
+ )
244
+ # print(
245
+ # f"ARRL-SECTION: {self.pref.get('section', '')}",
246
+ # end="\r\n",
247
+ # file=file_descriptor,
248
+ # )
249
+ print(
250
+ f"CATEGORY-OPERATOR: {self.contest_settings.get('OperatorCategory','')}",
251
+ end="\r\n",
252
+ file=file_descriptor,
253
+ )
254
+ print(
255
+ f"CATEGORY-ASSISTED: {self.contest_settings.get('AssistedCategory','')}",
256
+ end="\r\n",
257
+ file=file_descriptor,
258
+ )
259
+ print(
260
+ f"CATEGORY-BAND: {self.contest_settings.get('BandCategory','')}",
261
+ end="\r\n",
262
+ file=file_descriptor,
263
+ )
264
+ print(
265
+ f"CATEGORY-MODE: {self.contest_settings.get('ModeCategory','')}",
266
+ end="\r\n",
267
+ file=file_descriptor,
268
+ )
269
+ print(
270
+ f"CATEGORY-TRANSMITTER: {self.contest_settings.get('TransmitterCategory','')}",
271
+ end="\r\n",
272
+ file=file_descriptor,
273
+ )
274
+ if self.contest_settings.get("OverlayCategory", "") != "N/A":
275
+ print(
276
+ f"CATEGORY-OVERLAY: {self.contest_settings.get('OverlayCategory','')}",
277
+ end="\r\n",
278
+ file=file_descriptor,
279
+ )
280
+ print(
281
+ f"GRID-LOCATOR: {self.station.get('GridSquare','')}",
282
+ end="\r\n",
283
+ file=file_descriptor,
284
+ )
285
+ # print(
286
+ # f"CATEGORY: {None}",
287
+ # end="\r\n",
288
+ # file=file_descriptor,
289
+ # )
290
+ print(
291
+ f"CATEGORY-POWER: {self.contest_settings.get('PowerCategory','')}",
292
+ end="\r\n",
293
+ file=file_descriptor,
294
+ )
295
+
296
+ print(
297
+ f"CLAIMED-SCORE: {calc_score(self)}",
298
+ end="\r\n",
299
+ file=file_descriptor,
300
+ )
301
+ ops = f"@{self.station.get('Call','')}"
302
+ list_of_ops = self.database.get_ops()
303
+ for op in list_of_ops:
304
+ ops += f", {op.get('Operator', '')}"
305
+ print(
306
+ f"OPERATORS: {ops}",
307
+ end="\r\n",
308
+ file=file_descriptor,
309
+ )
310
+ print(
311
+ f"NAME: {self.station.get('Name', '')}",
312
+ end="\r\n",
313
+ file=file_descriptor,
314
+ )
315
+ print(
316
+ f"ADDRESS: {self.station.get('Street1', '')}",
317
+ end="\r\n",
318
+ file=file_descriptor,
319
+ )
320
+ print(
321
+ f"ADDRESS-CITY: {self.station.get('City', '')}",
322
+ end="\r\n",
323
+ file=file_descriptor,
324
+ )
325
+ print(
326
+ f"ADDRESS-STATE-PROVINCE: {self.station.get('State', '')}",
327
+ end="\r\n",
328
+ file=file_descriptor,
329
+ )
330
+ print(
331
+ f"ADDRESS-POSTALCODE: {self.station.get('Zip', '')}",
332
+ end="\r\n",
333
+ file=file_descriptor,
334
+ )
335
+ print(
336
+ f"ADDRESS-COUNTRY: {self.station.get('Country', '')}",
337
+ end="\r\n",
338
+ file=file_descriptor,
339
+ )
340
+ print(
341
+ f"EMAIL: {self.station.get('Email', '')}",
342
+ end="\r\n",
343
+ file=file_descriptor,
344
+ )
345
+ for contact in log:
346
+ the_date_and_time = contact.get("TS", "")
347
+ themode = contact.get("Mode", "")
348
+ if themode == "LSB" or themode == "USB":
349
+ themode = "PH"
350
+ if themode == "LSB" or themode == "USB":
351
+ themode = "PH"
352
+ if themode.strip() in (
353
+ "RTTY",
354
+ "RTTY-R",
355
+ "LSB-D",
356
+ "USB-D",
357
+ "AM-D",
358
+ "FM-D",
359
+ "DIGI-U",
360
+ "DIGI-L",
361
+ "RTTYR",
362
+ "PKTLSB",
363
+ "PKTUSB",
364
+ ):
365
+ themode = "RY"
366
+ frequency = str(int(contact.get("Freq", "0"))).rjust(5)
367
+
368
+ loggeddate = the_date_and_time[:10]
369
+ loggedtime = the_date_and_time[11:13] + the_date_and_time[14:16]
370
+ print(
371
+ f"QSO: {frequency} {themode} {loggeddate} {loggedtime} "
372
+ f"{contact.get('StationPrefix', '').ljust(13)} "
373
+ f"{str(contact.get('SentNr', '')).upper()} "
374
+ f"{contact.get('Call', '').ljust(13)} "
375
+ f"{str(contact.get('Name', '')).ljust(11)} "
376
+ f"{str(contact.get('Sect', '')).ljust(5)}",
377
+ end="\r\n",
378
+ file=file_descriptor,
379
+ )
380
+ print("END-OF-LOG:", end="\r\n", file=file_descriptor)
381
+ self.show_message_box(f"Cabrillo saved to: {filename}")
382
+ except IOError as exception:
383
+ logger.critical("cabrillo: IO error: %s, writing to %s", exception, filename)
384
+ self.show_message_box(f"Error saving Cabrillo: {exception} {filename}")
385
+ return
386
+
387
+
388
+ def recalculate_mults(self):
389
+ """Recalculates multipliers after change in logged qso."""
390
+
391
+ all_contacts = self.database.fetch_all_contacts_asc()
392
+ for contact in all_contacts:
393
+ time_stamp = contact.get("TS", "")
394
+ sect = contact.get("Sect", "")
395
+ band = contact.get("Band", "")
396
+ query = (
397
+ f"select count(*) as sect_count from dxlog where TS < '{time_stamp}' "
398
+ f"and Sect = '{sect}' "
399
+ f"and Band = '{band}' "
400
+ f"and ContestNR = {self.pref.get('contest', '1')};"
401
+ )
402
+ result = self.database.exec_sql(query)
403
+ count = result.get("sect_count", 1)
404
+ if count == 0 and contact.get("Points", 0) == 1 and sect != "DX":
405
+ contact["IsMultiplier1"] = 1
406
+ else:
407
+ contact["IsMultiplier1"] = 0
408
+ self.database.change_contact(contact)
409
+ cmd = {}
410
+ cmd["cmd"] = "UPDATELOG"
411
+ cmd["station"] = platform.node()
412
+ self.multicast_interface.send_as_json(cmd)
413
+
414
+
415
+ def set_self(the_outie):
416
+ """..."""
417
+ globals()["ALTEREGO"] = the_outie
418
+
419
+
420
+ def ft8_handler(the_packet: dict):
421
+ """Process FT8 QSO packets
422
+ FT8
423
+ {
424
+ 'CALL': 'KE0OG',
425
+ 'GRIDSQUARE': 'DM10AT',
426
+ 'MODE': 'FT8',
427
+ 'RST_SENT': '',
428
+ 'RST_RCVD': '',
429
+ 'QSO_DATE': '20210329',
430
+ 'TIME_ON': '183213',
431
+ 'QSO_DATE_OFF': '20210329',
432
+ 'TIME_OFF': '183213',
433
+ 'BAND': '20M',
434
+ 'FREQ': '14.074754',
435
+ 'STATION_CALLSIGN': 'K6GTE',
436
+ 'MY_GRIDSQUARE': 'DM13AT',
437
+ 'CONTEST_ID': 'ARRL-FIELD-DAY',
438
+ 'SRX_STRING': '1D UT',
439
+ 'CLASS': '1D',
440
+ 'ARRL_SECT': 'UT'
441
+ }
442
+ FlDigi
443
+ {
444
+ 'FREQ': '7.029500',
445
+ 'CALL': 'DL2DSL',
446
+ 'MODE': 'RTTY',
447
+ 'NAME': 'BOB',
448
+ 'QSO_DATE': '20240904',
449
+ 'QSO_DATE_OFF': '20240904',
450
+ 'TIME_OFF': '212825',
451
+ 'TIME_ON': '212800',
452
+ 'RST_RCVD': '599',
453
+ 'RST_SENT': '599',
454
+ 'BAND': '40M',
455
+ 'COUNTRY': 'FED. REP. OF GERMANY',
456
+ 'CQZ': '14',
457
+ 'STX': '000',
458
+ 'STX_STRING': '1D ORG',
459
+ 'CLASS': '1D',
460
+ 'ARRL_SECT': 'DX',
461
+ 'TX_PWR': '0',
462
+ 'OPERATOR': 'K6GTE',
463
+ 'STATION_CALLSIGN': 'K6GTE',
464
+ 'MY_GRIDSQUARE': 'DM13AT',
465
+ 'MY_CITY': 'ANAHEIM, CA',
466
+ 'MY_STATE': 'CA'
467
+ }
468
+
469
+ """
470
+ logger.debug(f"{the_packet=}")
471
+ print(f"{the_packet=}")
472
+ # the_packet=
473
+ # {
474
+ # 'FREQ': '14.028415', 'CALL': 'K5TUY', 'MODE': 'RTTY', 'NAME': 'RUSS', 'QSO_DATE': '20241015',
475
+ # 'QSO_DATE_OFF': '20241015', 'TIME_OFF': '131334', 'TIME_ON': '130300', 'RST_RCVD': '599', 'RST_SENT': '599',
476
+ # 'BAND': '20M', 'COUNTRY': 'USA', 'CQZ': '5', 'STX': '000', 'SRX_STRING': 'MO', 'STX_STRING': 'DM13',
477
+ # 'TX_PWR': '0', 'OPERATOR': 'K6GTE', 'STATION_CALLSIGN': 'K6GTE', 'MY_GRIDSQUARE': 'DM13AT',
478
+ # 'MY_CITY': 'ANAHEIM, CA', 'MY_STATE': 'CA'
479
+ # }
480
+ if ALTEREGO is not None:
481
+ ALTEREGO.callsign.setText(the_packet.get("CALL"))
482
+ ALTEREGO.contact["Call"] = the_packet.get("CALL", "")
483
+ ALTEREGO.contact["SNT"] = ALTEREGO.sent.text()
484
+ ALTEREGO.contact["RCV"] = ALTEREGO.receive.text()
485
+ ALTEREGO.other_1.setText(str(the_packet.get("NAME", "")))
486
+ ALTEREGO.other_2.setText(f'{the_packet.get("SRX_STRING", "")}'.strip())
487
+ ALTEREGO.contact["ZN"] = the_packet.get("CQZ", "")
488
+ ALTEREGO.contact["Mode"] = the_packet.get("MODE", "ERR")
489
+ ALTEREGO.contact["Freq"] = round(float(the_packet.get("FREQ", "0.0")) * 1000, 2)
490
+ ALTEREGO.contact["QSXFreq"] = round(
491
+ float(the_packet.get("FREQ", "0.0")) * 1000, 2
492
+ )
493
+ ALTEREGO.contact["Band"] = get_logged_band(
494
+ str(int(float(the_packet.get("FREQ", "0.0")) * 1000000))
495
+ )
496
+ logger.debug(f"{ALTEREGO.contact=}")
497
+
498
+ ALTEREGO.save_contact()
499
+
500
+
501
+ def process_esm(self, new_focused_widget=None, with_enter=False):
502
+ """ESM State Machine"""
503
+
504
+ # self.pref["run_state"]
505
+
506
+ # -----===== Assigned F-Keys =====-----
507
+ # self.esm_dict["CQ"]
508
+ # self.esm_dict["EXCH"]
509
+ # self.esm_dict["QRZ"]
510
+ # self.esm_dict["AGN"]
511
+ # self.esm_dict["HISCALL"]
512
+ # self.esm_dict["MYCALL"]
513
+ # self.esm_dict["QSOB4"]
514
+
515
+ # ----==== text fields ====----
516
+ # self.callsign
517
+ # self.sent
518
+ # self.receive
519
+ # self.other_1
520
+ # self.other_2
521
+
522
+ if new_focused_widget is not None:
523
+ self.current_widget = self.inputs_dict.get(new_focused_widget)
524
+
525
+ # print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}")
526
+
527
+ for a_button in [
528
+ self.F1,
529
+ self.F2,
530
+ self.F3,
531
+ self.F4,
532
+ self.F5,
533
+ self.F6,
534
+ self.F7,
535
+ self.F8,
536
+ self.F9,
537
+ self.F10,
538
+ self.F11,
539
+ self.F12,
540
+ ]:
541
+ self.restore_button_color(a_button)
542
+
543
+ buttons_to_send = []
544
+
545
+ if self.pref.get("run_state"):
546
+ if self.current_widget == "callsign":
547
+ if len(self.callsign.text()) < 3:
548
+ self.make_button_green(self.esm_dict["CQ"])
549
+ buttons_to_send.append(self.esm_dict["CQ"])
550
+ elif (
551
+ len(self.callsign.text()) > 2
552
+ and self.callsign.text().replace("/", "").isalnum()
553
+ ):
554
+ self.make_button_green(self.esm_dict["HISCALL"])
555
+ self.make_button_green(self.esm_dict["EXCH"])
556
+ buttons_to_send.append(self.esm_dict["HISCALL"])
557
+ buttons_to_send.append(self.esm_dict["EXCH"])
558
+
559
+ elif self.current_widget == "other_1" or self.current_widget == "other_2":
560
+ continent = self.contact.get("Continent")
561
+ print(
562
+ f"{self.current_widget=} {self.other_1.text().isalpha()=} {self.other_2.text().isalpha()=} {continent=}"
563
+ )
564
+ if self.other_1.text() == "" or (
565
+ self.other_2.text() == "" and continent == "NA"
566
+ ):
567
+ self.make_button_green(self.esm_dict["AGN"])
568
+ buttons_to_send.append(self.esm_dict["AGN"])
569
+ elif (
570
+ self.other_1.text().isalpha()
571
+ and self.other_2.text().isalpha()
572
+ and continent == "NA"
573
+ ):
574
+ self.make_button_green(self.esm_dict["QRZ"])
575
+ buttons_to_send.append(self.esm_dict["QRZ"])
576
+ buttons_to_send.append("LOGIT")
577
+ elif self.other_1.text().isalpha() and continent != "NA":
578
+ self.make_button_green(self.esm_dict["QRZ"])
579
+ buttons_to_send.append(self.esm_dict["QRZ"])
580
+ buttons_to_send.append("LOGIT")
581
+ else:
582
+ self.make_button_green(self.esm_dict["AGN"])
583
+ buttons_to_send.append(self.esm_dict["AGN"])
584
+
585
+ if with_enter is True and bool(len(buttons_to_send)):
586
+ sendstring = ""
587
+ for button in buttons_to_send:
588
+ if button:
589
+ if button == "LOGIT":
590
+ self.save_contact()
591
+ continue
592
+ sendstring = f"{sendstring}{self.process_macro(button.toolTip())} "
593
+ self.fldigi_util.send_string(sendstring)
594
+ else:
595
+ if self.current_widget == "callsign":
596
+ if (
597
+ len(self.callsign.text()) > 2
598
+ and self.callsign.text().replace("/", "").isalnum()
599
+ ):
600
+ self.make_button_green(self.esm_dict["MYCALL"])
601
+ buttons_to_send.append(self.esm_dict["MYCALL"])
602
+
603
+ elif self.current_widget == "other_1" or self.current_widget == "other_2":
604
+ continent = self.contact.get("Continent")
605
+ if self.other_1.text() == "" or (
606
+ self.other_2.text() == "" and continent == "NA"
607
+ ):
608
+ self.make_button_green(self.esm_dict["AGN"])
609
+ buttons_to_send.append(self.esm_dict["AGN"])
610
+ elif (
611
+ self.other_1.text().isalpha()
612
+ and self.other_2.text().isalpha()
613
+ and continent == "NA"
614
+ ):
615
+ self.make_button_green(self.esm_dict["EXCH"])
616
+ buttons_to_send.append(self.esm_dict["EXCH"])
617
+ buttons_to_send.append("LOGIT")
618
+ elif self.other_1.text().isalpha() and continent != "NA":
619
+ self.make_button_green(self.esm_dict["EXCH"])
620
+ buttons_to_send.append(self.esm_dict["EXCH"])
621
+ buttons_to_send.append("LOGIT")
622
+ else:
623
+ self.make_button_green(self.esm_dict["AGN"])
624
+ buttons_to_send.append(self.esm_dict["AGN"])
625
+
626
+ if with_enter is True and bool(len(buttons_to_send)):
627
+ sendstring = ""
628
+ for button in buttons_to_send:
629
+ if button:
630
+ if button == "LOGIT":
631
+ self.save_contact()
632
+ continue
633
+ sendstring = f"{sendstring}{self.process_macro(button.toolTip())} "
634
+ self.fldigi_util.send_string(sendstring)
@@ -361,3 +361,135 @@ def recalculate_mults(self):
361
361
  cmd["cmd"] = "UPDATELOG"
362
362
  cmd["station"] = platform.node()
363
363
  self.multicast_interface.send_as_json(cmd)
364
+
365
+
366
+ def process_esm(self, new_focused_widget=None, with_enter=False):
367
+ """ESM State Machine"""
368
+
369
+ # self.pref["run_state"]
370
+
371
+ # -----===== Assigned F-Keys =====-----
372
+ # self.esm_dict["CQ"]
373
+ # self.esm_dict["EXCH"]
374
+ # self.esm_dict["QRZ"]
375
+ # self.esm_dict["AGN"]
376
+ # self.esm_dict["HISCALL"]
377
+ # self.esm_dict["MYCALL"]
378
+ # self.esm_dict["QSOB4"]
379
+
380
+ # ----==== text fields ====----
381
+ # self.callsign
382
+ # self.sent
383
+ # self.receive
384
+ # self.other_1
385
+ # self.other_2
386
+
387
+ if new_focused_widget is not None:
388
+ self.current_widget = self.inputs_dict.get(new_focused_widget)
389
+
390
+ # print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}")
391
+
392
+ for a_button in [
393
+ self.F1,
394
+ self.F2,
395
+ self.F3,
396
+ self.F4,
397
+ self.F5,
398
+ self.F6,
399
+ self.F7,
400
+ self.F8,
401
+ self.F9,
402
+ self.F10,
403
+ self.F11,
404
+ self.F12,
405
+ ]:
406
+ self.restore_button_color(a_button)
407
+
408
+ buttons_to_send = []
409
+
410
+ if self.pref.get("run_state"):
411
+ if self.current_widget == "callsign":
412
+ if len(self.callsign.text()) < 3:
413
+ self.make_button_green(self.esm_dict["CQ"])
414
+ buttons_to_send.append(self.esm_dict["CQ"])
415
+ elif (
416
+ len(self.callsign.text()) > 2
417
+ and self.callsign.text().replace("/", "").isalnum()
418
+ ):
419
+ self.make_button_green(self.esm_dict["HISCALL"])
420
+ self.make_button_green(self.esm_dict["EXCH"])
421
+ buttons_to_send.append(self.esm_dict["HISCALL"])
422
+ buttons_to_send.append(self.esm_dict["EXCH"])
423
+
424
+ elif self.current_widget == "other_1" or self.current_widget == "other_2":
425
+ continent = self.contact.get("Continent")
426
+ print(
427
+ f"{self.current_widget=} {self.other_1.text().isalpha()=} {self.other_2.text().isalpha()=} {continent=}"
428
+ )
429
+ if self.other_1.text() == "" or (
430
+ self.other_2.text() == "" and continent == "NA"
431
+ ):
432
+ self.make_button_green(self.esm_dict["AGN"])
433
+ buttons_to_send.append(self.esm_dict["AGN"])
434
+ elif (
435
+ self.other_1.text().isalpha()
436
+ and self.other_2.text().isalpha()
437
+ and continent == "NA"
438
+ ):
439
+ self.make_button_green(self.esm_dict["QRZ"])
440
+ buttons_to_send.append(self.esm_dict["QRZ"])
441
+ buttons_to_send.append("LOGIT")
442
+ elif self.other_1.text().isalpha() and continent != "NA":
443
+ self.make_button_green(self.esm_dict["QRZ"])
444
+ buttons_to_send.append(self.esm_dict["QRZ"])
445
+ buttons_to_send.append("LOGIT")
446
+ else:
447
+ self.make_button_green(self.esm_dict["AGN"])
448
+ buttons_to_send.append(self.esm_dict["AGN"])
449
+
450
+ if with_enter is True and bool(len(buttons_to_send)):
451
+ for button in buttons_to_send:
452
+ if button:
453
+ if button == "LOGIT":
454
+ self.save_contact()
455
+ continue
456
+ self.process_function_key(button)
457
+ else:
458
+ if self.current_widget == "callsign":
459
+ if (
460
+ len(self.callsign.text()) > 2
461
+ and self.callsign.text().replace("/", "").isalnum()
462
+ ):
463
+ self.make_button_green(self.esm_dict["MYCALL"])
464
+ buttons_to_send.append(self.esm_dict["MYCALL"])
465
+
466
+ elif self.current_widget == "other_1" or self.current_widget == "other_2":
467
+ continent = self.contact.get("Continent")
468
+ if self.other_1.text() == "" or (
469
+ self.other_2.text() == "" and continent == "NA"
470
+ ):
471
+ self.make_button_green(self.esm_dict["AGN"])
472
+ buttons_to_send.append(self.esm_dict["AGN"])
473
+ elif (
474
+ self.other_1.text().isalpha()
475
+ and self.other_2.text().isalpha()
476
+ and continent == "NA"
477
+ ):
478
+ self.make_button_green(self.esm_dict["EXCH"])
479
+ buttons_to_send.append(self.esm_dict["EXCH"])
480
+ buttons_to_send.append("LOGIT")
481
+ elif self.other_1.text().isalpha() and continent != "NA":
482
+ self.make_button_green(self.esm_dict["EXCH"])
483
+ buttons_to_send.append(self.esm_dict["EXCH"])
484
+ buttons_to_send.append("LOGIT")
485
+ else:
486
+ self.make_button_green(self.esm_dict["AGN"])
487
+ buttons_to_send.append(self.esm_dict["AGN"])
488
+
489
+ if with_enter is True and bool(len(buttons_to_send)):
490
+ for button in buttons_to_send:
491
+ if button:
492
+ if button == "LOGIT":
493
+ self.save_contact()
494
+ continue
495
+ self.process_function_key(button)
@@ -491,7 +491,10 @@ def process_esm(self, new_focused_widget=None, with_enter=False):
491
491
  if len(self.callsign.text()) < 3:
492
492
  self.make_button_green(self.esm_dict["CQ"])
493
493
  buttons_to_send.append(self.esm_dict["CQ"])
494
- elif len(self.callsign.text()) > 2 and self.callsign.text().isalnum():
494
+ elif (
495
+ len(self.callsign.text()) > 2
496
+ and self.callsign.text().replace("/", "").isalnum()
497
+ ):
495
498
  self.make_button_green(self.esm_dict["HISCALL"])
496
499
  self.make_button_green(self.esm_dict["EXCH"])
497
500
  buttons_to_send.append(self.esm_dict["HISCALL"])
@@ -520,7 +523,10 @@ def process_esm(self, new_focused_widget=None, with_enter=False):
520
523
  self.fldigi_util.send_string(sendstring)
521
524
  else:
522
525
  if self.current_widget == "callsign":
523
- if len(self.callsign.text()) > 2 and self.callsign.text().isalnum():
526
+ if (
527
+ len(self.callsign.text()) > 2
528
+ and self.callsign.text().replace("/", "").isalnum()
529
+ ):
524
530
  self.make_button_green(self.esm_dict["MYCALL"])
525
531
  buttons_to_send.append(self.esm_dict["MYCALL"])
526
532
 
not1mm/test.py CHANGED
@@ -0,0 +1,11 @@
1
+ from dasbus.connection import SessionMessageBus
2
+
3
+ bus = SessionMessageBus()
4
+
5
+ proxy = bus.get_proxy("org.freedesktop.Notifications", "/org/freedesktop/Notifications")
6
+
7
+ id = proxy.Notify(
8
+ "weenes", 0, "face-smile", "My notification", "Hello World!", [], {}, 0
9
+ )
10
+
11
+ print("The notification {} was sent.".format(id))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: not1mm
3
- Version: 24.10.14
3
+ Version: 24.10.15.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
@@ -213,7 +213,7 @@ generated, 'cause I'm lazy, list of those who've submitted PR's.
213
213
  - ARRL Sweepstakes CW, SSB
214
214
  - ARRL VHF January, June, September
215
215
  - CQ 160 CW, SSB
216
- - CQ WPX CW, RTTY, SSB
216
+ - .CQ WPX CW, RTTY, SSB
217
217
  - .CQ World Wide CW, RTTY, SSB
218
218
  - .CWOps CWT
219
219
  - Helvetia
@@ -222,7 +222,7 @@ generated, 'cause I'm lazy, list of those who've submitted PR's.
222
222
  - ICWC MST
223
223
  - Japan International DX CW, SSB
224
224
  - .K1USN Slow Speed Test
225
- - NAQP CW, SSB
225
+ - .NAQP CW, RTTY, SSB
226
226
  - Phone Weekly Test
227
227
  - RAC Canada Day
228
228
  - Stew Perry Topband
@@ -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-15-1] Fix callsigns with a slash failing check during ESM.
235
+ - [24-10-15] Add NAQP RTTY, Added ESM to NAQP.
234
236
  - [24-10-14] Add ESM to CQ WPX.
235
237
  - [24-10-13] Added ESM to Weekly RTTY, K1USN and CWT.
236
238
  - [24-10-11] added ESM to CQWW SSB and RTTY.
@@ -6,7 +6,7 @@ not1mm/fsutils.py,sha256=ukHKxKTeNKxKwqRaJjtzRShL4X5Xl0jRBbADyy3Ifp8,1701
6
6
  not1mm/logwindow.py,sha256=pwhiwolmGnW01LF4sjlu3ywLsgfxL6KuGuKuYKYmgeY,44403
7
7
  not1mm/lookupservice.py,sha256=jsFg5tsB9cVnahLP-hI3CMwbjlEpMx944O8RLWntAy4,3342
8
8
  not1mm/radio.py,sha256=WM5hRTKUSH6D1Hxk240kYVlSuMaVp7dgVn_GAkck8_g,4498
9
- not1mm/test.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
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
12
12
  not1mm/data/JetBrainsMono-ExtraLight.ttf,sha256=g5Hn7BPounWMGDj1a8zZcyKMz03HSqW__pUluRR7Evg,274144
@@ -31,7 +31,7 @@ not1mm/data/k6gte.not1mm-64.png,sha256=6ku45Gq1g5ezh04F07osoKRtanb3e4kbx5XdIEh3N
31
31
  not1mm/data/logwindow.ui,sha256=f7vULj96tHIQuR1nJMyvPHHcmVgzkhv9D1isyojsnFU,1458
32
32
  not1mm/data/logwindowx.ui,sha256=CwpI-h7cI1yqyldH9quKftsdHL5lTyL9ABOcf80nfqc,1632
33
33
  not1mm/data/main.ui,sha256=IOrAJfJDhG30bWi08pLBGzDKjBvjKfPNI9-GNpvu0vI,61886
34
- not1mm/data/new_contest.ui,sha256=oIe15jiIN50wc5THeJLIO3KYZWXUyqRt9n_ShD0qO7Y,23116
34
+ not1mm/data/new_contest.ui,sha256=zqNza6syjqZdVFKS57gzMCL4vD7Fg9n_wO3mS7DDXpg,23222
35
35
  not1mm/data/not1mm.html,sha256=c9-mfjMwDt4f5pySUruz2gREW33CQ2_rCddM2z5CZQo,23273
36
36
  not1mm/data/opon.ui,sha256=QDicqAk2lORG2UWsHa6jHlsGn6uzrrI2R4HSAocpPes,2258
37
37
  not1mm/data/pickcontest.ui,sha256=4hPBszCglObThx_eIWtmK9CEcbr7WBjbB1rKZdI-o3I,1707
@@ -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=5FcRZ4LJYlhATkLgCJmVozjtLkJZxonDosjR6rRNS7o,49
117
+ not1mm/lib/version.py,sha256=K45m7-Zh4DrvtwerVRaXChj6ZuKm5DIU4eQhNu_tA6w,51
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
@@ -134,13 +134,13 @@ not1mm/plugins/arrl_vhf_sep.py,sha256=3f5mmXuoe7jt6A8FXFBwentO3lyGMCHSgtkiDcX4Uu
134
134
  not1mm/plugins/canada_day.py,sha256=OVpcCl1Chse_zLHf6PayTrgawWM4W-pmrTw40Al-o9s,11998
135
135
  not1mm/plugins/cq_160_cw.py,sha256=5s6rIZdJEnmWe1SI06BEyz7p5vP0N2n9mI4l_mZ0icw,14139
136
136
  not1mm/plugins/cq_160_ssb.py,sha256=zIwSMAjHSt6W2edrDzVbyTf860JowHoFkU9BKO8Enag,14182
137
- not1mm/plugins/cq_wpx_cw.py,sha256=parnwI_NkM3ODgw95Mt-yJvwqTLXB56ghFvQPcORXy4,17659
138
- not1mm/plugins/cq_wpx_rtty.py,sha256=p2a0l6aKpYAY19KJWSRJKp8fCbdcBfyQR33DGQpZ3YE,20478
139
- not1mm/plugins/cq_wpx_ssb.py,sha256=vqohvHlHl7wH2eqzytGJOjWerRP4MExK3-4TY2hioNo,16309
140
- not1mm/plugins/cq_ww_cw.py,sha256=kJCL4dIJOEW9O45vPTjWhQpa7KPZv8fkEAs4MJHpfkY,15962
141
- not1mm/plugins/cq_ww_rtty.py,sha256=njYqgr9ZijRaZgPwYumt95jrCE8kmFg4zwbaaJY1cMU,20772
142
- not1mm/plugins/cq_ww_ssb.py,sha256=NGNysV6MR7OILLtfMF1Gp82gErjUEyekJ0WnWkUhgHA,16156
143
- not1mm/plugins/cwt.py,sha256=AWUEZFY1ezts3dfHw1iKeXum-IdxXnoqe1LoenxputE,16542
137
+ not1mm/plugins/cq_wpx_cw.py,sha256=bAKhgpTkrSupu9mTJNKTsKGSSmqjnYIoKzhJ37LkC70,17789
138
+ not1mm/plugins/cq_wpx_rtty.py,sha256=K35PWGJjXeURwYEV2lZJDBc7bi-VzBWPA0swQ88vtS4,20608
139
+ not1mm/plugins/cq_wpx_ssb.py,sha256=wekrWKrdBeZ7_uLqRkOiXhz6IJu03MRyCEIgJrOKLg8,16439
140
+ not1mm/plugins/cq_ww_cw.py,sha256=kmKCxI9TFup3nVw1mWziO3mbJaGHZgUrv3SMket-O2E,16092
141
+ not1mm/plugins/cq_ww_rtty.py,sha256=WbDr-uttuzVqglGdrZugPW3YrmabeDIdEbr-2YcpF1E,20902
142
+ not1mm/plugins/cq_ww_ssb.py,sha256=zMN-Ny64KddSgtr8GzcepgOphMBR51O-EFEy5yF2oW0,16286
143
+ not1mm/plugins/cwt.py,sha256=dGdB7j9PyxTHAX_iAQXud0n3m11tPeOthynjZvy01zc,16672
144
144
  not1mm/plugins/general_logging.py,sha256=n-2es7erqK1ptwq_wwIKIwktptKN7ra2eWjAQlpXUac,3479
145
145
  not1mm/plugins/helvetia.py,sha256=6aOO4uiLzFFgHA-A3xz6IRdCJpqPOAm0egKxP5Y_Ie0,15432
146
146
  not1mm/plugins/iaru_fieldday_r1_cw.py,sha256=B_kh8d8LkC0va_iIiIzImOKAT8724yf9ceF-2eQdx1w,13301
@@ -149,17 +149,18 @@ not1mm/plugins/iaru_hf.py,sha256=-ROUo2gBkw3xB89t8bd-4f7_1hROw2VXZXVHLFdB62s,115
149
149
  not1mm/plugins/icwc_mst.py,sha256=v8L5NX2QmTM7x8Po1mb4yfN-dGVIuqky5MIT-OjfaVY,11831
150
150
  not1mm/plugins/jidx_cw.py,sha256=9oV4hDxMiGXa9wuYUNYOCsr-mz8LYB-4WMHBN8u2dFk,12153
151
151
  not1mm/plugins/jidx_ph.py,sha256=T-V7-77SIwu-Jl55VIrbVFZlsBoc97mXtgbdde0GaiQ,11183
152
- not1mm/plugins/k1usn_sst.py,sha256=l-_r-Ve1txpJF1UyqoaOKUXjTaKxQtzxCbXd7fZCZIg,15439
153
- not1mm/plugins/naqp_cw.py,sha256=c0MuKqfkIxiYFvv2z7vqrBz3m9FSnSYkPK3f-DdkTIA,12632
154
- not1mm/plugins/naqp_ssb.py,sha256=VLWVrSzI0UP1AhSXYn61eZ7or1rz6a_pS_xCKfgS4Jw,11595
152
+ not1mm/plugins/k1usn_sst.py,sha256=yyErpWQvQSN7bzMG8lna7LoOE3sVa6OiPFmKP9O-sqA,15569
153
+ not1mm/plugins/naqp_cw.py,sha256=1_7jKINgV5QOtDbKcA1uyfcw93qVjVEVTSwJ4Pi3Oy0,17648
154
+ not1mm/plugins/naqp_rtty.py,sha256=cCjus3Fu7rcM7jTIKoNytLUu2PN6qCbgJrxhU6_u1mo,21429
155
+ not1mm/plugins/naqp_ssb.py,sha256=xv4r44Yq7kUGNMFyWmK_886IrnvwGFwSV_zgXxQWkkE,16565
155
156
  not1mm/plugins/phone_weekly_test.py,sha256=fLpMe03WB9_KgRl6vMgQQt_aktFdqfNt2Sw81CTRAUs,12325
156
157
  not1mm/plugins/ref_cw.py,sha256=aWjHHkqIKutjRUtzh09y5haFfnZK9poRQDWRQMDRxxU,16326
157
158
  not1mm/plugins/stew_perry_topband.py,sha256=CKBQbYl4ETxhXJd2dma4fg_C5pag_s7Nf61SCztZtqE,10668
158
- not1mm/plugins/weekly_rtty.py,sha256=S_oBAnsIq2ng7FunIB2qukdZyhMzQKGDAlQFc9UUr-U,18255
159
+ not1mm/plugins/weekly_rtty.py,sha256=SYnj8izW39_XHxkoNUM2inaYKSlEE0LD5Vilm9zSkvk,18385
159
160
  not1mm/plugins/winter_field_day.py,sha256=4rcfRtobwjHO6BNL3WOTHzBmyyeuX79BNGBG8PfjrI8,10238
160
- not1mm-24.10.14.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
161
- not1mm-24.10.14.dist-info/METADATA,sha256=B_xYjcgKKAYPEdlNEi-KOrti6GC670xE54LjuUNsc4I,33810
162
- not1mm-24.10.14.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
163
- not1mm-24.10.14.dist-info/entry_points.txt,sha256=pMcZk_0dxFgLkcUkF0Q874ojpwOmF3OL6EKw9LgvocM,47
164
- not1mm-24.10.14.dist-info/top_level.txt,sha256=0YmTxEcDzQlzXub-lXASvoLpg_mt1c2thb5cVkDf5J4,7
165
- not1mm-24.10.14.dist-info/RECORD,,
161
+ not1mm-24.10.15.1.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
162
+ not1mm-24.10.15.1.dist-info/METADATA,sha256=zwSxF8Vf2GttGv2Iub2Z1BZxPOcb0-8b7rxo_gOSYo4,33935
163
+ not1mm-24.10.15.1.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
164
+ not1mm-24.10.15.1.dist-info/entry_points.txt,sha256=pMcZk_0dxFgLkcUkF0Q874ojpwOmF3OL6EKw9LgvocM,47
165
+ not1mm-24.10.15.1.dist-info/top_level.txt,sha256=0YmTxEcDzQlzXub-lXASvoLpg_mt1c2thb5cVkDf5J4,7
166
+ not1mm-24.10.15.1.dist-info/RECORD,,