not1mm 24.5.25__py3-none-any.whl → 24.7.12__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/settings.ui CHANGED
@@ -1255,7 +1255,7 @@
1255
1255
  </palette>
1256
1256
  </property>
1257
1257
  <property name="focusPolicy">
1258
- <enum>Qt::StrongFocus</enum>
1258
+ <enum>Qt::FocusPolicy::StrongFocus</enum>
1259
1259
  </property>
1260
1260
  <property name="accessibleName">
1261
1261
  <string>c q zone</string>
@@ -1374,7 +1374,7 @@
1374
1374
  <item>
1375
1375
  <spacer name="horizontalSpacer_2">
1376
1376
  <property name="orientation">
1377
- <enum>Qt::Horizontal</enum>
1377
+ <enum>Qt::Orientation::Horizontal</enum>
1378
1378
  </property>
1379
1379
  <property name="sizeHint" stdset="0">
1380
1380
  <size>
@@ -1387,10 +1387,10 @@
1387
1387
  <item>
1388
1388
  <widget class="QDialogButtonBox" name="buttonBox">
1389
1389
  <property name="orientation">
1390
- <enum>Qt::Horizontal</enum>
1390
+ <enum>Qt::Orientation::Horizontal</enum>
1391
1391
  </property>
1392
1392
  <property name="standardButtons">
1393
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
1393
+ <set>QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok</set>
1394
1394
  </property>
1395
1395
  <property name="centerButtons">
1396
1396
  <bool>true</bool>
@@ -1400,7 +1400,7 @@
1400
1400
  <item>
1401
1401
  <spacer name="horizontalSpacer">
1402
1402
  <property name="orientation">
1403
- <enum>Qt::Horizontal</enum>
1403
+ <enum>Qt::Orientation::Horizontal</enum>
1404
1404
  </property>
1405
1405
  <property name="sizeHint" stdset="0">
1406
1406
  <size>
not1mm/lib/n1mm.py CHANGED
@@ -102,6 +102,21 @@ class N1MM:
102
102
  "ID": "",
103
103
  }
104
104
 
105
+ score_report = {
106
+ "app": "NOT1MM",
107
+ "contest": "",
108
+ "call": "",
109
+ "class": {
110
+ "ops": "SINGLE-OP",
111
+ "mode": "MIXED",
112
+ "power": "LOW",
113
+ "bands": "ALL",
114
+ "transmitter": "ONE",
115
+ },
116
+ "score": 0,
117
+ "timestamp": "",
118
+ }
119
+
105
120
  def __init__(
106
121
  self,
107
122
  radioport="127.0.0.1:12060",
@@ -159,6 +174,14 @@ class N1MM:
159
174
  """Send lookup request"""
160
175
  self._send(self.lookup_port, self.contact_info, "lookupinfo")
161
176
 
177
+ def send_score(self):
178
+ """Send score"""
179
+ self._send(self.score_port, self.score_report, "scoreinfo")
180
+
181
+ def send_realtime_score(self):
182
+ """Send score"""
183
+ self._send(self.score_port, self.score_report, "dynamicresults")
184
+
162
185
  def _send(self, port_list, payload, package_name):
163
186
  """Send XML data"""
164
187
  # bytes_to_send = dicttoxml(
not1mm/lib/version.py CHANGED
@@ -1,3 +1,3 @@
1
1
  """It's the version"""
2
2
 
3
- __version__ = "24.5.25"
3
+ __version__ = "24.7.12"
@@ -167,9 +167,9 @@ def predupe(self):
167
167
  def prefill(self):
168
168
  """Fill sentnr"""
169
169
  result = self.database.get_serial()
170
- serial_nr = str(result.get("serial_nr", "1"))
170
+ serial_nr = str(result.get("serial_nr", "1")).zfill(3)
171
171
  if serial_nr == "None":
172
- serial_nr = "1"
172
+ serial_nr = "001"
173
173
 
174
174
  exchange = self.contest_settings.get("SentExchange", "").replace("#", serial_nr)
175
175
  field = self.field3.findChild(QtWidgets.QLineEdit)
@@ -126,9 +126,9 @@ def predupe(self):
126
126
  def prefill(self):
127
127
  """Fill SentNR"""
128
128
  result = self.database.get_serial()
129
- serial_nr = str(result.get("serial_nr", "1"))
129
+ serial_nr = str(result.get("serial_nr", "1")).zfill(3)
130
130
  if serial_nr == "None":
131
- serial_nr = "1"
131
+ serial_nr = "001"
132
132
  field = self.field3.findChild(QtWidgets.QLineEdit)
133
133
  if len(field.text()) == 0:
134
134
  field.setText(serial_nr)
@@ -126,9 +126,9 @@ def predupe(self):
126
126
  def prefill(self):
127
127
  """Fill SentNR"""
128
128
  result = self.database.get_serial()
129
- serial_nr = str(result.get("serial_nr", "1"))
129
+ serial_nr = str(result.get("serial_nr", "1")).zfill(3)
130
130
  if serial_nr == "None":
131
- serial_nr = "1"
131
+ serial_nr = "001"
132
132
  field = self.field3.findChild(QtWidgets.QLineEdit)
133
133
  if len(field.text()) == 0:
134
134
  field.setText(serial_nr)
@@ -156,9 +156,9 @@ def predupe(self):
156
156
  def prefill(self):
157
157
  """Fill sentnr"""
158
158
  result = self.database.get_serial()
159
- serial_nr = str(result.get("serial_nr", "1"))
159
+ serial_nr = str(result.get("serial_nr", "1")).zfill(3)
160
160
  if serial_nr == "None":
161
- serial_nr = "1"
161
+ serial_nr = "001"
162
162
 
163
163
  exchange = self.contest_settings.get("SentExchange", "").replace("#", serial_nr)
164
164
  field = self.field3.findChild(QtWidgets.QLineEdit)
@@ -124,9 +124,9 @@ def predupe(self):
124
124
  def prefill(self):
125
125
  """Fill sentnr"""
126
126
  result = self.database.get_serial()
127
- serial_nr = str(result.get("serial_nr", "1"))
127
+ serial_nr = str(result.get("serial_nr", "1")).zfill(3)
128
128
  if serial_nr == "None":
129
- serial_nr = "1"
129
+ serial_nr = "001"
130
130
 
131
131
  exchange = self.contest_settings.get("SentExchange", "").replace("#", serial_nr)
132
132
  field = self.field3.findChild(QtWidgets.QLineEdit)
@@ -124,9 +124,9 @@ def predupe(self):
124
124
  def prefill(self):
125
125
  """Fill sentnr"""
126
126
  result = self.database.get_serial()
127
- serial_nr = str(result.get("serial_nr", "1"))
127
+ serial_nr = str(result.get("serial_nr", "1")).zfill(3)
128
128
  if serial_nr == "None":
129
- serial_nr = "1"
129
+ serial_nr = "001"
130
130
 
131
131
  exchange = self.contest_settings.get("SentExchange", "").replace("#", serial_nr)
132
132
  field = self.field3.findChild(QtWidgets.QLineEdit)
@@ -155,9 +155,9 @@ def prefill(self):
155
155
  # self.other_2.setText(str(self.contact.get("ZN", "")))
156
156
 
157
157
  result = self.database.get_serial()
158
- serial_nr = str(result.get("serial_nr", "1"))
158
+ serial_nr = str(result.get("serial_nr", "1")).zfill(3)
159
159
  if serial_nr == "None":
160
- serial_nr = "1"
160
+ serial_nr = "001"
161
161
 
162
162
  exchange = self.contest_settings.get("SentExchange", "").replace("#", serial_nr)
163
163
  field = self.field3.findChild(QtWidgets.QLineEdit)
@@ -157,9 +157,9 @@ def predupe(self): # pylint: disable=unused-argument
157
157
  def prefill(self):
158
158
  """Fill SentNR"""
159
159
  result = self.database.get_serial()
160
- serial_nr = str(result.get("serial_nr", "1"))
160
+ serial_nr = str(result.get("serial_nr", "1")).zfill(3)
161
161
  if serial_nr == "None":
162
- serial_nr = "1"
162
+ serial_nr = "001"
163
163
  field = self.field3.findChild(QtWidgets.QLineEdit)
164
164
  if len(field.text()) == 0:
165
165
  field.setText(serial_nr)
@@ -122,9 +122,9 @@ def predupe(self): # pylint: disable=unused-argument
122
122
  def prefill(self):
123
123
  """Fill SentNR"""
124
124
  result = self.database.get_serial()
125
- serial_nr = str(result.get("serial_nr", "1"))
125
+ serial_nr = str(result.get("serial_nr", "1")).zfill(3)
126
126
  if serial_nr == "None":
127
- serial_nr = "1"
127
+ serial_nr = "001"
128
128
  field = self.field3.findChild(QtWidgets.QLineEdit)
129
129
  if len(field.text()) == 0:
130
130
  field.setText(serial_nr)
@@ -135,35 +135,39 @@ def points(self):
135
135
  result = self.cty_lookup(self.station.get("Call", ""))
136
136
  if result:
137
137
  for item in result.items():
138
- mycountry = item[1].get("entity", "")
139
- mycontinent = item[1].get("continent", "")
138
+ my_country = item[1].get("entity", "")
139
+ my_continent = item[1].get("continent", "")
140
140
  result = self.cty_lookup(self.contact.get("Call", ""))
141
141
  band = int(int(float(self.contact.get("Freq", 0))) / 1000)
142
142
  if result:
143
143
  for item in result.items():
144
- entity = item[1].get("entity", "")
145
- continent = item[1].get("continent", "")
144
+ their_country = item[1].get("entity", "")
145
+ their_continent = item[1].get("continent", "")
146
146
 
147
- # If both are in North America
148
- if mycontinent == "NA" and continent == "NA":
147
+ # Different Continent
148
+ if my_continent != their_continent:
149
149
  if band in [28, 21, 14]:
150
- return 2
151
- return 4
150
+ return 3
151
+ return 6
152
152
 
153
- # Not NA, Both in same country
154
- if mycountry.upper() == entity.upper():
153
+ # Both in same country
154
+ if my_country.upper() == their_country.upper():
155
155
  return 1
156
156
 
157
- # Same Continent
158
- if mycontinent == continent:
157
+ # Below Same Continent Different Country
158
+
159
+ # If in North America
160
+ if my_continent == "NA":
161
+ if band in [28, 21, 14]:
162
+ return 2
163
+ return 4
164
+
165
+ # Non NA
166
+ if my_continent != "NA":
159
167
  if band in [28, 21, 14]:
160
168
  return 1
161
169
  return 2
162
-
163
- # Different Continent
164
- if band in [28, 21, 14]:
165
- return 3
166
- return 6
170
+ # Something wrong
167
171
  return 0
168
172
 
169
173
 
@@ -138,9 +138,9 @@ def predupe(self): # pylint: disable=unused-argument
138
138
  def prefill(self):
139
139
  """Fill SentNR"""
140
140
  result = self.database.get_serial()
141
- serial_nr = str(result.get("serial_nr", "1"))
141
+ serial_nr = str(result.get("serial_nr", "1")).zfill(3)
142
142
  if serial_nr == "None":
143
- serial_nr = "1"
143
+ serial_nr = "001"
144
144
  field = self.sent
145
145
  if len(field.text()) == 0:
146
146
  field.setText(serial_nr)
not1mm/plugins/jidx_cw.py CHANGED
@@ -152,9 +152,9 @@ def prefill(self):
152
152
  SentExchange = self.contest_settings.get("SentExchange", "")
153
153
  if "#" in SentExchange:
154
154
  result = self.database.get_serial()
155
- serial_nr = str(result.get("serial_nr", "1"))
155
+ serial_nr = str(result.get("serial_nr", "1")).zfill(3)
156
156
  if serial_nr == "None":
157
- serial_nr = "1"
157
+ serial_nr = "001"
158
158
  SentExchange.replace("#", str(serial_nr))
159
159
 
160
160
  field = self.field3.findChild(QtWidgets.QLineEdit)
not1mm/plugins/jidx_ph.py CHANGED
@@ -123,9 +123,9 @@ def prefill(self):
123
123
  SentExchange = self.contest_settings.get("SentExchange", "")
124
124
  if "#" in SentExchange:
125
125
  result = self.database.get_serial()
126
- serial_nr = str(result.get("serial_nr", "1"))
126
+ serial_nr = str(result.get("serial_nr", "1")).zfill(3)
127
127
  if serial_nr == "None":
128
- serial_nr = "1"
128
+ serial_nr = "001"
129
129
  SentExchange.replace("#", str(serial_nr))
130
130
 
131
131
  field = self.field3.findChild(QtWidgets.QLineEdit)
@@ -21,4 +21,347 @@
21
21
  # Find rules at: http://www.k1usn.com/sst.html
22
22
 
23
23
  import datetime
24
+ import logging
25
+ import platform
24
26
 
27
+ from pathlib import Path
28
+
29
+ from PyQt6 import QtWidgets
30
+
31
+ from not1mm.lib.plugin_common import gen_adif, get_points
32
+ from not1mm.lib.version import __version__
33
+
34
+ logger = logging.getLogger(__name__)
35
+
36
+ EXCHANGE_HINT = "Name or Name + SPC"
37
+
38
+ name = "PHONE WEEKLY TEST"
39
+ cabrillo_name = "PHONE-WEEKLY-TEST"
40
+ mode = "SSB" # CW SSB BOTH RTTY
41
+ # columns = [0, 1, 2, 3, 4, 10, 11, 14, 15]
42
+ columns = [
43
+ "YYYY-MM-DD HH:MM:SS",
44
+ "Call",
45
+ "Freq",
46
+ "Name",
47
+ "Sect",
48
+ "M1",
49
+ "PTS",
50
+ ]
51
+
52
+ advance_on_space = [True, True, True, True, True]
53
+
54
+ # 1 once per contest, 2 work each band, 3 each band/mode, 4 no dupe checking
55
+ dupe_type = 2
56
+
57
+
58
+ def init_contest(self):
59
+ """setup plugin"""
60
+ set_tab_next(self)
61
+ set_tab_prev(self)
62
+ interface(self)
63
+ self.next_field = self.other_1
64
+
65
+
66
+ def interface(self):
67
+ """Setup user interface"""
68
+ self.field1.hide()
69
+ self.field2.hide()
70
+ self.field3.show()
71
+ self.field4.show()
72
+ namefield = self.field3.findChild(QtWidgets.QLabel)
73
+ namefield.setText("Name")
74
+ self.field3.setAccessibleName("Name")
75
+ spc = self.field4.findChild(QtWidgets.QLabel)
76
+ spc.setText("State")
77
+ self.field4.setAccessibleName("State")
78
+
79
+
80
+ def reset_label(self):
81
+ """reset label after field cleared"""
82
+
83
+
84
+ def set_tab_next(self):
85
+ """Set TAB Advances"""
86
+ self.tab_next = {
87
+ self.callsign: self.field3.findChild(QtWidgets.QLineEdit),
88
+ self.field3.findChild(QtWidgets.QLineEdit): self.field4.findChild(
89
+ QtWidgets.QLineEdit
90
+ ),
91
+ self.field4.findChild(QtWidgets.QLineEdit): self.callsign,
92
+ }
93
+
94
+
95
+ def set_tab_prev(self):
96
+ """Set TAB Advances"""
97
+ self.tab_prev = {
98
+ self.callsign: self.field4.findChild(QtWidgets.QLineEdit),
99
+ self.field3.findChild(QtWidgets.QLineEdit): self.callsign,
100
+ self.field4.findChild(QtWidgets.QLineEdit): self.field3.findChild(
101
+ QtWidgets.QLineEdit
102
+ ),
103
+ }
104
+
105
+
106
+ def set_contact_vars(self):
107
+ """Contest Specific"""
108
+ self.contact["SNT"] = self.sent.text()
109
+ self.contact["RCV"] = self.receive.text()
110
+ self.contact["Name"] = self.other_1.text().upper()
111
+ self.contact["Sect"] = self.other_2.text().upper()
112
+ self.contact["SentNr"] = self.contest_settings.get("SentExchange", 0)
113
+
114
+ if self.contact.get("Sect", ""):
115
+ result = self.database.fetch_sect_band_exists(
116
+ self.contact.get("Sect", ""), self.contact.get("Band", "")
117
+ )
118
+ if result.get("sect_count", ""):
119
+ self.contact["IsMultiplier1"] = 0
120
+ else:
121
+ self.contact["IsMultiplier1"] = 1
122
+
123
+
124
+ def predupe(self):
125
+ """called after callsign entered"""
126
+
127
+
128
+ def prefill(self):
129
+ """Fill sentnr"""
130
+
131
+
132
+ def points(self):
133
+ """Calc point"""
134
+ return 1
135
+
136
+
137
+ def show_mults(self):
138
+ """Return display string for mults"""
139
+ result = self.database.fetch_section_band_count_nodx()
140
+ if result:
141
+ return int(result.get("sb_count", 0))
142
+ return 0
143
+
144
+
145
+ def show_qso(self):
146
+ """Return qso count"""
147
+ result = self.database.fetch_qso_count()
148
+ if result:
149
+ return int(result.get("qsos", 0))
150
+ return 0
151
+
152
+
153
+ def calc_score(self):
154
+ """Return calculated score"""
155
+ result = self.database.fetch_points()
156
+ if result is not None:
157
+ score = result.get("Points", "0")
158
+ if score is None:
159
+ score = "0"
160
+ contest_points = int(score)
161
+ mults = show_mults(self)
162
+ return contest_points * mults
163
+ return 0
164
+
165
+
166
+ def adif(self):
167
+ """Call the generate ADIF function"""
168
+ gen_adif(self, cabrillo_name, "K1USN-SST")
169
+
170
+
171
+ def cabrillo(self):
172
+ """Generates Cabrillo file. Maybe."""
173
+ # https://www.cqwpx.com/cabrillo.htm
174
+ logger.debug("******Cabrillo*****")
175
+ logger.debug("Station: %s", f"{self.station}")
176
+ logger.debug("Contest: %s", f"{self.contest_settings}")
177
+ now = datetime.datetime.now()
178
+ date_time = now.strftime("%Y-%m-%d_%H-%M-%S")
179
+ filename = (
180
+ str(Path.home())
181
+ + "/"
182
+ + f"{self.station.get('Call','').upper()}_{cabrillo_name}_{date_time}.log"
183
+ )
184
+ logger.debug("%s", filename)
185
+ log = self.database.fetch_all_contacts_asc()
186
+ try:
187
+ with open(filename, "w", encoding="ascii") as file_descriptor:
188
+ print("START-OF-LOG: 3.0", end="\r\n", file=file_descriptor)
189
+ print(
190
+ f"CREATED-BY: Not1MM v{__version__}",
191
+ end="\r\n",
192
+ file=file_descriptor,
193
+ )
194
+ print(
195
+ f"CONTEST: {cabrillo_name}",
196
+ end="\r\n",
197
+ file=file_descriptor,
198
+ )
199
+ if self.station.get("Club", ""):
200
+ print(
201
+ f"CLUB: {self.station.get('Club', '').upper()}",
202
+ end="\r\n",
203
+ file=file_descriptor,
204
+ )
205
+ print(
206
+ f"CALLSIGN: {self.station.get('Call','')}",
207
+ end="\r\n",
208
+ file=file_descriptor,
209
+ )
210
+ print(
211
+ f"LOCATION: {self.station.get('ARRLSection', '')}",
212
+ end="\r\n",
213
+ file=file_descriptor,
214
+ )
215
+ # print(
216
+ # f"ARRL-SECTION: {self.pref.get('section', '')}",
217
+ # end="\r\n",
218
+ # file=file_descriptor,
219
+ # )
220
+ print(
221
+ f"CATEGORY-OPERATOR: {self.contest_settings.get('OperatorCategory','')}",
222
+ end="\r\n",
223
+ file=file_descriptor,
224
+ )
225
+ print(
226
+ f"CATEGORY-ASSISTED: {self.contest_settings.get('AssistedCategory','')}",
227
+ end="\r\n",
228
+ file=file_descriptor,
229
+ )
230
+ print(
231
+ f"CATEGORY-BAND: {self.contest_settings.get('BandCategory','')}",
232
+ end="\r\n",
233
+ file=file_descriptor,
234
+ )
235
+ print(
236
+ f"CATEGORY-MODE: {self.contest_settings.get('ModeCategory','')}",
237
+ end="\r\n",
238
+ file=file_descriptor,
239
+ )
240
+ print(
241
+ f"CATEGORY-TRANSMITTER: {self.contest_settings.get('TransmitterCategory','')}",
242
+ end="\r\n",
243
+ file=file_descriptor,
244
+ )
245
+ if self.contest_settings.get("OverlayCategory", "") != "N/A":
246
+ print(
247
+ f"CATEGORY-OVERLAY: {self.contest_settings.get('OverlayCategory','')}",
248
+ end="\r\n",
249
+ file=file_descriptor,
250
+ )
251
+ print(
252
+ f"GRID-LOCATOR: {self.station.get('GridSquare','')}",
253
+ end="\r\n",
254
+ file=file_descriptor,
255
+ )
256
+ # print(
257
+ # f"CATEGORY: {None}",
258
+ # end="\r\n",
259
+ # file=file_descriptor,
260
+ # )
261
+ print(
262
+ f"CATEGORY-POWER: {self.contest_settings.get('PowerCategory','')}",
263
+ end="\r\n",
264
+ file=file_descriptor,
265
+ )
266
+
267
+ print(
268
+ f"CLAIMED-SCORE: {calc_score(self)}",
269
+ end="\r\n",
270
+ file=file_descriptor,
271
+ )
272
+ ops = f"@{self.station.get('Call','')}"
273
+ list_of_ops = self.database.get_ops()
274
+ for op in list_of_ops:
275
+ ops += f", {op.get('Operator', '')}"
276
+ print(
277
+ f"OPERATORS: {ops}",
278
+ end="\r\n",
279
+ file=file_descriptor,
280
+ )
281
+ print(
282
+ f"NAME: {self.station.get('Name', '')}",
283
+ end="\r\n",
284
+ file=file_descriptor,
285
+ )
286
+ print(
287
+ f"ADDRESS: {self.station.get('Street1', '')}",
288
+ end="\r\n",
289
+ file=file_descriptor,
290
+ )
291
+ print(
292
+ f"ADDRESS-CITY: {self.station.get('City', '')}",
293
+ end="\r\n",
294
+ file=file_descriptor,
295
+ )
296
+ print(
297
+ f"ADDRESS-STATE-PROVINCE: {self.station.get('State', '')}",
298
+ end="\r\n",
299
+ file=file_descriptor,
300
+ )
301
+ print(
302
+ f"ADDRESS-POSTALCODE: {self.station.get('Zip', '')}",
303
+ end="\r\n",
304
+ file=file_descriptor,
305
+ )
306
+ print(
307
+ f"ADDRESS-COUNTRY: {self.station.get('Country', '')}",
308
+ end="\r\n",
309
+ file=file_descriptor,
310
+ )
311
+ print(
312
+ f"EMAIL: {self.station.get('Email', '')}",
313
+ end="\r\n",
314
+ file=file_descriptor,
315
+ )
316
+ for contact in log:
317
+ the_date_and_time = contact.get("TS", "")
318
+ themode = contact.get("Mode", "")
319
+ if themode == "LSB" or themode == "USB":
320
+ themode = "PH"
321
+ frequency = str(int(contact.get("Freq", "0"))).rjust(5)
322
+
323
+ loggeddate = the_date_and_time[:10]
324
+ loggedtime = the_date_and_time[11:13] + the_date_and_time[14:16]
325
+ print(
326
+ f"QSO: {frequency} {themode} {loggeddate} {loggedtime} "
327
+ f"{contact.get('StationPrefix', '').ljust(13)} "
328
+ f"{str(contact.get('SentNr', '')).upper()} "
329
+ f"{contact.get('Call', '').ljust(13)} "
330
+ f"{str(contact.get('Name', '')).ljust(11)} "
331
+ f"{str(contact.get('Sect', '')).ljust(5)}",
332
+ end="\r\n",
333
+ file=file_descriptor,
334
+ )
335
+ print("END-OF-LOG:", end="\r\n", file=file_descriptor)
336
+ self.show_message_box(f"Cabrillo saved to: {filename}")
337
+ except IOError as exception:
338
+ logger.critical("cabrillo: IO error: %s, writing to %s", exception, filename)
339
+ self.show_message_box(f"Error saving Cabrillo: {exception} {filename}")
340
+ return
341
+
342
+
343
+ def recalculate_mults(self):
344
+ """Recalculates multipliers after change in logged qso."""
345
+
346
+ all_contacts = self.database.fetch_all_contacts_asc()
347
+ for contact in all_contacts:
348
+ time_stamp = contact.get("TS", "")
349
+ sect = contact.get("Sect", "")
350
+ band = contact.get("Band", "")
351
+ query = (
352
+ f"select count(*) as sect_count from dxlog where TS < '{time_stamp}' "
353
+ f"and Sect = '{sect}' "
354
+ f"and Band = '{band}' "
355
+ f"and ContestNR = {self.pref.get('contest', '1')};"
356
+ )
357
+ result = self.database.exec_sql(query)
358
+ count = result.get("sect_count", 1)
359
+ if count == 0 and contact.get("Points", 0) == 1 and sect != "DX":
360
+ contact["IsMultiplier1"] = 1
361
+ else:
362
+ contact["IsMultiplier1"] = 0
363
+ self.database.change_contact(contact)
364
+ cmd = {}
365
+ cmd["cmd"] = "UPDATELOG"
366
+ cmd["station"] = platform.node()
367
+ self.multicast_interface.send_as_json(cmd)
@@ -181,7 +181,7 @@ def calc_score(self):
181
181
 
182
182
  def adif(self):
183
183
  """Call the generate ADIF function"""
184
- gen_adif(self, cabrillo_name, "NAQP-SSB")
184
+ gen_adif(self, cabrillo_name, "WEEKLY-PHONE-TEST")
185
185
 
186
186
 
187
187
  def cabrillo(self):