not1mm 25.1.27__py3-none-any.whl → 25.1.27.2__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.
@@ -362,6 +362,11 @@
362
362
  <string>K1USN SST</string>
363
363
  </property>
364
364
  </item>
365
+ <item>
366
+ <property name="text">
367
+ <string>LABRE RS DIGI</string>
368
+ </property>
369
+ </item>
365
370
  <item>
366
371
  <property name="text">
367
372
  <string>LZ-DX</string>
not1mm/lib/version.py CHANGED
@@ -1,3 +1,3 @@
1
1
  """It's the version"""
2
2
 
3
- __version__ = "25.1.27"
3
+ __version__ = "25.1.27.2"
@@ -6,6 +6,7 @@ import logging
6
6
 
7
7
  from PyQt6 import QtWidgets
8
8
 
9
+ from not1mm.lib.ham_utility import get_logged_band
9
10
  from not1mm.lib.plugin_common import gen_adif, get_points
10
11
  from not1mm.lib.version import __version__
11
12
 
@@ -183,19 +184,18 @@ def process_esm(self, new_focused_widget=None, with_enter=False):
183
184
  buttons_to_send.append(self.esm_dict["HISCALL"])
184
185
  buttons_to_send.append(self.esm_dict["EXCH"])
185
186
 
186
- # elif self.current_widget in ["other_1", "other_2"]:
187
- # if self.other_2.text() == "" and self.other_1.text() == "":
188
- # self.make_button_green(self.esm_dict["AGN"])
189
- # buttons_to_send.append(self.esm_dict["AGN"])
190
- # else:
191
- # self.make_button_green(self.esm_dict["QRZ"])
192
- # buttons_to_send.append(self.esm_dict["QRZ"])
193
- # buttons_to_send.append("LOGIT")
187
+ # elif self.current_widget in ["other_1", "other_2"]:
188
+ # if self.other_2.text() == "" and self.other_1.text() == "":
189
+ # self.make_button_green(self.esm_dict["AGN"])
190
+ # buttons_to_send.append(self.esm_dict["AGN"])
191
+ # else:
192
+ # self.make_button_green(self.esm_dict["QRZ"])
193
+ # buttons_to_send.append(self.esm_dict["QRZ"])
194
+ # buttons_to_send.append("LOGIT")
194
195
 
195
196
  elif self.current_widget in ["other_1", "other_2"]:
196
197
  buttons_to_send.append("LOGIT")
197
198
 
198
-
199
199
  if with_enter is True and bool(len(buttons_to_send)):
200
200
  for button in buttons_to_send:
201
201
  if button:
@@ -209,19 +209,18 @@ def process_esm(self, new_focused_widget=None, with_enter=False):
209
209
  self.make_button_green(self.esm_dict["MYCALL"])
210
210
  buttons_to_send.append(self.esm_dict["MYCALL"])
211
211
 
212
- # elif self.current_widget in ["other_1", "other_2"]:
213
- # if self.other_2.text() == "" and self.other_1.text() == "":
214
- # self.make_button_green(self.esm_dict["AGN"])
215
- # buttons_to_send.append(self.esm_dict["AGN"])
216
- # else:
217
- # self.make_button_green(self.esm_dict["EXCH"])
218
- # buttons_to_send.append(self.esm_dict["EXCH"])
219
- # buttons_to_send.append("LOGIT")
212
+ # elif self.current_widget in ["other_1", "other_2"]:
213
+ # if self.other_2.text() == "" and self.other_1.text() == "":
214
+ # self.make_button_green(self.esm_dict["AGN"])
215
+ # buttons_to_send.append(self.esm_dict["AGN"])
216
+ # else:
217
+ # self.make_button_green(self.esm_dict["EXCH"])
218
+ # buttons_to_send.append(self.esm_dict["EXCH"])
219
+ # buttons_to_send.append("LOGIT")
220
220
 
221
221
  elif self.current_widget in ["other_1", "other_2"]:
222
222
  buttons_to_send.append("LOGIT")
223
223
 
224
-
225
224
  if with_enter is True and bool(len(buttons_to_send)):
226
225
  for button in buttons_to_send:
227
226
  if button:
@@ -248,3 +247,90 @@ def check_call_history(self):
248
247
  self.history_info.setText(f"{result.get('UserText','')}")
249
248
  if self.other_1.text() == "":
250
249
  self.other_1.setText(f"{result.get('Name', '')}")
250
+
251
+
252
+ def set_self(the_outie):
253
+ """..."""
254
+ globals()["ALTEREGO"] = the_outie
255
+
256
+
257
+ def ft8_handler(the_packet: dict):
258
+ """Process FT8 QSO packets
259
+ FT8
260
+ {
261
+ 'CALL': 'KE0OG',
262
+ 'GRIDSQUARE': 'DM10AT',
263
+ 'MODE': 'FT8',
264
+ 'RST_SENT': '',
265
+ 'RST_RCVD': '',
266
+ 'QSO_DATE': '20210329',
267
+ 'TIME_ON': '183213',
268
+ 'QSO_DATE_OFF': '20210329',
269
+ 'TIME_OFF': '183213',
270
+ 'BAND': '20M',
271
+ 'FREQ': '14.074754',
272
+ 'STATION_CALLSIGN': 'K6GTE',
273
+ 'MY_GRIDSQUARE': 'DM13AT',
274
+ 'CONTEST_ID': 'ARRL-FIELD-DAY',
275
+ 'SRX_STRING': '1D UT',
276
+ 'CLASS': '1D',
277
+ 'ARRL_SECT': 'UT'
278
+ }
279
+ FlDigi
280
+ {
281
+ 'FREQ': '7.029500',
282
+ 'CALL': 'DL2DSL',
283
+ 'MODE': 'RTTY',
284
+ 'NAME': 'BOB',
285
+ 'QSO_DATE': '20240904',
286
+ 'QSO_DATE_OFF': '20240904',
287
+ 'TIME_OFF': '212825',
288
+ 'TIME_ON': '212800',
289
+ 'RST_RCVD': '599',
290
+ 'RST_SENT': '599',
291
+ 'BAND': '40M',
292
+ 'COUNTRY': 'FED. REP. OF GERMANY',
293
+ 'CQZ': '14',
294
+ 'STX': '000',
295
+ 'STX_STRING': '1D ORG',
296
+ 'CLASS': '1D',
297
+ 'ARRL_SECT': 'DX',
298
+ 'TX_PWR': '0',
299
+ 'OPERATOR': 'K6GTE',
300
+ 'STATION_CALLSIGN': 'K6GTE',
301
+ 'MY_GRIDSQUARE': 'DM13AT',
302
+ 'MY_CITY': 'ANAHEIM, CA',
303
+ 'MY_STATE': 'CA'
304
+ }
305
+
306
+ """
307
+ # print(f"\n{the_packet=}\n")
308
+ if ALTEREGO is not None:
309
+ ALTEREGO.callsign.setText(the_packet.get("CALL"))
310
+ ALTEREGO.contact["Call"] = the_packet.get("CALL", "")
311
+ ALTEREGO.contact["SNT"] = ALTEREGO.sent.text()
312
+ ALTEREGO.contact["RCV"] = ALTEREGO.receive.text()
313
+ my_grid = the_packet.get("MY_GRIDSQUARE", "")
314
+ if my_grid:
315
+ if len(my_grid) > 4:
316
+ my_grid = my_grid[:4]
317
+ their_grid = the_packet.get("GRIDSQUARE", "")
318
+ if their_grid:
319
+ if len(their_grid) > 4:
320
+ their_grid = their_grid[:4]
321
+ ALTEREGO.contact["NR"] = their_grid
322
+ if the_packet.get("SUBMODE"):
323
+ ALTEREGO.contact["Mode"] = the_packet.get("SUBMODE", "ERR")
324
+ else:
325
+ ALTEREGO.contact["Mode"] = the_packet.get("MODE", "ERR")
326
+ ALTEREGO.contact["Freq"] = round(float(the_packet.get("FREQ", "0.0")) * 1000, 2)
327
+ ALTEREGO.contact["QSXFreq"] = round(
328
+ float(the_packet.get("FREQ", "0.0")) * 1000, 2
329
+ )
330
+ ALTEREGO.contact["Band"] = get_logged_band(
331
+ str(int(float(the_packet.get("FREQ", "0.0")) * 1000000))
332
+ )
333
+ # print(f"\n{ALTEREGO.contact=}\n")
334
+ # ALTEREGO.other_1.setText(my_grid)
335
+ # ALTEREGO.other_2.setText(their_grid)
336
+ ALTEREGO.save_contact()
@@ -0,0 +1,635 @@
1
+ """LABRE-RS Digi"""
2
+
3
+ # LABRE-RS Digi Contest
4
+ # Status: Active
5
+ # Geographic Focus: Worldwide
6
+ # Participation: Worldwide
7
+ # Mode: FT4/8
8
+ # Bands: 80, 40, 20, 15, 10m
9
+ # Classes: Single Op(QRP/Low/High)
10
+ # Multi-Single (Low/High)
11
+ # Multi-Multi
12
+ # Max power: HP: 1500 watts
13
+ # LP: 100 watts
14
+ # QRP: 5 watts
15
+ # Exchange: 4-character grid square
16
+ # Work stations: Once per band
17
+ # QSO Points: 1 point per QSO
18
+ # 1 additional point per QSO with PY3,PU3,ZZ3,PP3,etc
19
+ # Multipliers: Each grid field (first 2 letters of grid square) once per band
20
+ # Score Calculation: Total score = total QSO points x total mults
21
+ # E-mail logs to: (none)
22
+ # Upload log at: https://hampass.org/contests
23
+ # Mail logs to: (none)
24
+ # Find rules at: https://labre-rs.org.br/labre-rs-digi-contest/
25
+ # Cabrillo name: CQWW-DIGI
26
+ # Cabrillo name aliases:
27
+
28
+ # pylint: disable=invalid-name, unused-argument, unused-variable, c-extension-no-member
29
+
30
+ import datetime
31
+ import logging
32
+
33
+ from pathlib import Path
34
+ from PyQt6 import QtWidgets
35
+
36
+ from not1mm.lib.ham_utility import get_logged_band
37
+ from not1mm.lib.plugin_common import gen_adif, get_points, online_score_xml
38
+ from not1mm.lib.version import __version__
39
+
40
+ logger = logging.getLogger(__name__)
41
+
42
+ ALTEREGO = None
43
+ EXCHANGE_HINT = "4-character grid square"
44
+
45
+ name = "LABRE-RS Digi"
46
+ mode = "RTTY" # CW SSB BOTH RTTY
47
+ cabrillo_name = "LABRE-DIGI"
48
+
49
+ columns = [
50
+ "YYYY-MM-DD HH:MM:SS",
51
+ "Call",
52
+ "Freq",
53
+ "Mode",
54
+ "SentNr",
55
+ "RcvNr",
56
+ "PTS",
57
+ ]
58
+
59
+ advance_on_space = [True, True, True, True, True]
60
+
61
+ # 1 once per contest, 2 work each band, 3 each band/mode, 4 no dupe checking
62
+ dupe_type = 2
63
+
64
+
65
+ def init_contest(self):
66
+ """setup plugin"""
67
+ set_tab_next(self)
68
+ set_tab_prev(self)
69
+ interface(self)
70
+ self.next_field = self.other_2
71
+
72
+
73
+ def interface(self):
74
+ """Setup user interface"""
75
+ self.field1.show()
76
+ self.field2.show()
77
+ self.field3.show()
78
+ self.field4.show()
79
+ self.snt_label.setText("SNT")
80
+ self.field1.setAccessibleName("RST Sent")
81
+ self.other_label.setText("SentNR")
82
+ self.field3.setAccessibleName("Sent Grid")
83
+ self.exch_label.setText("Grid")
84
+ self.field4.setAccessibleName("Gridsquare")
85
+
86
+
87
+ def reset_label(self):
88
+ """reset label after field cleared"""
89
+
90
+
91
+ def set_tab_next(self):
92
+ """Set TAB Advances"""
93
+ self.tab_next = {
94
+ self.callsign: self.sent,
95
+ self.sent: self.receive,
96
+ self.receive: self.other_1,
97
+ self.other_1: self.other_2,
98
+ self.other_2: self.callsign,
99
+ }
100
+
101
+
102
+ def set_tab_prev(self):
103
+ """Set TAB Advances"""
104
+ self.tab_prev = {
105
+ self.callsign: self.other_2,
106
+ self.sent: self.callsign,
107
+ self.receive: self.sent,
108
+ self.other_1: self.receive,
109
+ self.other_2: self.other_1,
110
+ }
111
+
112
+
113
+ def validate(self):
114
+ """doc"""
115
+ # exchange = self.other_2.text().upper().split()
116
+ # if len(exchange) == 3:
117
+ # if exchange[0].isalpha() and exchange[1].isdigit() and exchange[2].isalpha():
118
+ # return True
119
+ # return False
120
+ return True
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["NR"] = self.other_2.text().upper()
128
+ self.contact["SentNr"] = self.other_1.text()
129
+
130
+
131
+ def predupe(self):
132
+ """called after callsign entered"""
133
+
134
+
135
+ def prefill(self):
136
+ """Fill sentnr"""
137
+ result = self.database.get_serial()
138
+ serial_nr = str(result.get("serial_nr", "1")).zfill(3)
139
+ if serial_nr == "None":
140
+ serial_nr = "001"
141
+
142
+ exchange = self.contest_settings.get("SentExchange", "").replace("#", serial_nr)
143
+ if len(self.other_1.text()) == 0:
144
+ self.other_1.setText(exchange)
145
+
146
+
147
+ def points(self):
148
+ """Calc point"""
149
+
150
+ # QSO Points: 1 point per QSO
151
+ # 1 additional point per QSO with PY3,PU3,ZZ3,PP3,etc
152
+
153
+ if len(self.contact.get("Call", "")) > 2:
154
+ if self.contact.get("Call", "")[:3] in ["PY3", "PU3", "ZZ3", "PP3", "PX3"]:
155
+ return 2
156
+ return 1
157
+
158
+
159
+ def show_mults(self):
160
+ """Return display string for mults"""
161
+ # Each grid field (first 2 letters of grid square) once per band
162
+
163
+ dx = 0
164
+
165
+ sql = (
166
+ "select count(DISTINCT(SUBSTR(NR,1,2) || ':' || Band)) as mult_count "
167
+ f"from dxlog where ContestNR = {self.database.current_contest} and typeof(NR) = 'text';"
168
+ )
169
+ result = self.database.exec_sql(sql)
170
+
171
+ if result:
172
+ dx = result.get("mult_count", 0)
173
+
174
+ return dx
175
+
176
+
177
+ def show_qso(self):
178
+ """Return qso count"""
179
+ result = self.database.fetch_qso_count()
180
+ if result:
181
+ return int(result.get("qsos", 0))
182
+ return 0
183
+
184
+
185
+ def calc_score(self):
186
+ """Return calculated score"""
187
+ # Multipliers: Each US State + DC once per mode
188
+ _points = get_points(self)
189
+ _mults = show_mults(self)
190
+ _power_mult = 1
191
+ return _points * _power_mult * _mults
192
+
193
+
194
+ def adif(self):
195
+ """Call the generate ADIF function"""
196
+ gen_adif(self, cabrillo_name)
197
+
198
+
199
+ def output_cabrillo_line(line_to_output, ending, file_descriptor, file_encoding):
200
+ """"""
201
+ print(
202
+ line_to_output.encode(file_encoding, errors="ignore").decode(),
203
+ end=ending,
204
+ file=file_descriptor,
205
+ )
206
+
207
+
208
+ def cabrillo(self, file_encoding):
209
+ """Generates Cabrillo file. Maybe."""
210
+ # https://www.cqwpx.com/cabrillo.htm
211
+ logger.debug("******Cabrillo*****")
212
+ logger.debug("Station: %s", f"{self.station}")
213
+ logger.debug("Contest: %s", f"{self.contest_settings}")
214
+ now = datetime.datetime.now()
215
+ date_time = now.strftime("%Y-%m-%d_%H-%M-%S")
216
+ filename = (
217
+ str(Path.home())
218
+ + "/"
219
+ + f"{self.station.get('Call', '').upper()}_{cabrillo_name}_{date_time}.log"
220
+ )
221
+ logger.debug("%s", filename)
222
+ log = self.database.fetch_all_contacts_asc()
223
+ try:
224
+ with open(filename, "w", encoding=file_encoding) as file_descriptor:
225
+ output_cabrillo_line(
226
+ "START-OF-LOG: 3.0",
227
+ "\r\n",
228
+ file_descriptor,
229
+ file_encoding,
230
+ )
231
+ output_cabrillo_line(
232
+ f"CREATED-BY: Not1MM v{__version__}",
233
+ "\r\n",
234
+ file_descriptor,
235
+ file_encoding,
236
+ )
237
+ output_cabrillo_line(
238
+ f"CONTEST: {cabrillo_name}",
239
+ "\r\n",
240
+ file_descriptor,
241
+ file_encoding,
242
+ )
243
+ if self.station.get("Club", ""):
244
+ output_cabrillo_line(
245
+ f"CLUB: {self.station.get('Club', '').upper()}",
246
+ "\r\n",
247
+ file_descriptor,
248
+ file_encoding,
249
+ )
250
+ output_cabrillo_line(
251
+ f"CALLSIGN: {self.station.get('Call','')}",
252
+ "\r\n",
253
+ file_descriptor,
254
+ file_encoding,
255
+ )
256
+ output_cabrillo_line(
257
+ f"LOCATION: {self.station.get('ARRLSection', '')}",
258
+ "\r\n",
259
+ file_descriptor,
260
+ file_encoding,
261
+ )
262
+ output_cabrillo_line(
263
+ f"CATEGORY-OPERATOR: {self.contest_settings.get('OperatorCategory','')}",
264
+ "\r\n",
265
+ file_descriptor,
266
+ file_encoding,
267
+ )
268
+ output_cabrillo_line(
269
+ f"CATEGORY-ASSISTED: {self.contest_settings.get('AssistedCategory','')}",
270
+ "\r\n",
271
+ file_descriptor,
272
+ file_encoding,
273
+ )
274
+ output_cabrillo_line(
275
+ f"CATEGORY-BAND: {self.contest_settings.get('BandCategory','')}",
276
+ "\r\n",
277
+ file_descriptor,
278
+ file_encoding,
279
+ )
280
+ mode = self.contest_settings.get("ModeCategory", "")
281
+ if mode in ["SSB+CW", "SSB+CW+DIGITAL"]:
282
+ mode = "MIXED"
283
+ output_cabrillo_line(
284
+ f"CATEGORY-MODE: {mode}",
285
+ "\r\n",
286
+ file_descriptor,
287
+ file_encoding,
288
+ )
289
+ output_cabrillo_line(
290
+ f"CATEGORY-TRANSMITTER: {self.contest_settings.get('TransmitterCategory','')}",
291
+ "\r\n",
292
+ file_descriptor,
293
+ file_encoding,
294
+ )
295
+ if self.contest_settings.get("OverlayCategory", "") != "N/A":
296
+ output_cabrillo_line(
297
+ f"CATEGORY-OVERLAY: {self.contest_settings.get('OverlayCategory','')}",
298
+ "\r\n",
299
+ file_descriptor,
300
+ file_encoding,
301
+ )
302
+ output_cabrillo_line(
303
+ f"GRID-LOCATOR: {self.station.get('GridSquare','')}",
304
+ "\r\n",
305
+ file_descriptor,
306
+ file_encoding,
307
+ )
308
+ output_cabrillo_line(
309
+ f"CATEGORY-POWER: {self.contest_settings.get('PowerCategory','')}",
310
+ "\r\n",
311
+ file_descriptor,
312
+ file_encoding,
313
+ )
314
+
315
+ output_cabrillo_line(
316
+ f"CLAIMED-SCORE: {calc_score(self)}",
317
+ "\r\n",
318
+ file_descriptor,
319
+ file_encoding,
320
+ )
321
+ ops = f"@{self.station.get('Call','')}"
322
+ list_of_ops = self.database.get_ops()
323
+ for op in list_of_ops:
324
+ ops += f", {op.get('Operator', '')}"
325
+ output_cabrillo_line(
326
+ f"OPERATORS: {ops}",
327
+ "\r\n",
328
+ file_descriptor,
329
+ file_encoding,
330
+ )
331
+ output_cabrillo_line(
332
+ f"NAME: {self.station.get('Name', '')}",
333
+ "\r\n",
334
+ file_descriptor,
335
+ file_encoding,
336
+ )
337
+ output_cabrillo_line(
338
+ f"ADDRESS: {self.station.get('Street1', '')}",
339
+ "\r\n",
340
+ file_descriptor,
341
+ file_encoding,
342
+ )
343
+ output_cabrillo_line(
344
+ f"ADDRESS-CITY: {self.station.get('City', '')}",
345
+ "\r\n",
346
+ file_descriptor,
347
+ file_encoding,
348
+ )
349
+ output_cabrillo_line(
350
+ f"ADDRESS-STATE-PROVINCE: {self.station.get('State', '')}",
351
+ "\r\n",
352
+ file_descriptor,
353
+ file_encoding,
354
+ )
355
+ output_cabrillo_line(
356
+ f"ADDRESS-POSTALCODE: {self.station.get('Zip', '')}",
357
+ "\r\n",
358
+ file_descriptor,
359
+ file_encoding,
360
+ )
361
+ output_cabrillo_line(
362
+ f"ADDRESS-COUNTRY: {self.station.get('Country', '')}",
363
+ "\r\n",
364
+ file_descriptor,
365
+ file_encoding,
366
+ )
367
+ output_cabrillo_line(
368
+ f"EMAIL: {self.station.get('Email', '')}",
369
+ "\r\n",
370
+ file_descriptor,
371
+ file_encoding,
372
+ )
373
+ for contact in log:
374
+ the_date_and_time = contact.get("TS", "")
375
+ themode = contact.get("Mode", "")
376
+
377
+ if themode in ("LSB", "USB", "AM"):
378
+ themode = "PH"
379
+ if themode in (
380
+ "FT8",
381
+ "FT4",
382
+ "RTTY",
383
+ "PSK31",
384
+ "FSK441",
385
+ "MSK144",
386
+ "JT65",
387
+ "JT9",
388
+ "Q65",
389
+ ):
390
+ themode = "DG"
391
+ freq = int(contact.get("Freq", "0")) / 1000
392
+
393
+ frequency = str(int(freq)).rjust(4)
394
+
395
+ loggeddate = the_date_and_time[:10]
396
+ loggedtime = the_date_and_time[11:13] + the_date_and_time[14:16]
397
+ output_cabrillo_line(
398
+ f"QSO: {frequency} {themode} {loggeddate} {loggedtime} "
399
+ f"{contact.get('StationPrefix', '').ljust(13)} "
400
+ # f"{str(contact.get('SNT', '')).ljust(3)} "
401
+ f"{str(contact.get('SentNr', '')).ljust(6)} "
402
+ f"{contact.get('Call', '').ljust(13)} "
403
+ # f"{str(contact.get('RCV', '')).ljust(3)} "
404
+ f"{str(contact.get('NR', '')).ljust(6)}",
405
+ "\r\n",
406
+ file_descriptor,
407
+ file_encoding,
408
+ )
409
+ output_cabrillo_line("END-OF-LOG:", "\r\n", file_descriptor, file_encoding)
410
+ self.show_message_box(f"Cabrillo saved to: {filename}")
411
+ except IOError as exception:
412
+ logger.critical("cabrillo: IO error: %s, writing to %s", exception, filename)
413
+ self.show_message_box(f"Error saving Cabrillo: {exception} {filename}")
414
+ return
415
+
416
+
417
+ def recalculate_mults(self):
418
+ """Recalculates multipliers after change in logged qso."""
419
+
420
+
421
+ def set_self(the_outie):
422
+ """..."""
423
+ globals()["ALTEREGO"] = the_outie
424
+
425
+
426
+ def ft8_handler(the_packet: dict):
427
+ """Process FT8 QSO packets
428
+ FT8
429
+ {
430
+ 'CALL': 'KE0OG',
431
+ 'GRIDSQUARE': 'DM10AT',
432
+ 'MODE': 'FT8',
433
+ 'RST_SENT': '',
434
+ 'RST_RCVD': '',
435
+ 'QSO_DATE': '20210329',
436
+ 'TIME_ON': '183213',
437
+ 'QSO_DATE_OFF': '20210329',
438
+ 'TIME_OFF': '183213',
439
+ 'BAND': '20M',
440
+ 'FREQ': '14.074754',
441
+ 'STATION_CALLSIGN': 'K6GTE',
442
+ 'MY_GRIDSQUARE': 'DM13AT',
443
+ 'CONTEST_ID': 'ARRL-FIELD-DAY',
444
+ 'SRX_STRING': '1D UT',
445
+ 'CLASS': '1D',
446
+ 'ARRL_SECT': 'UT'
447
+ }
448
+ FlDigi
449
+ {
450
+ 'FREQ': '7.029500',
451
+ 'CALL': 'DL2DSL',
452
+ 'MODE': 'RTTY',
453
+ 'NAME': 'BOB',
454
+ 'QSO_DATE': '20240904',
455
+ 'QSO_DATE_OFF': '20240904',
456
+ 'TIME_OFF': '212825',
457
+ 'TIME_ON': '212800',
458
+ 'RST_RCVD': '599',
459
+ 'RST_SENT': '599',
460
+ 'BAND': '40M',
461
+ 'COUNTRY': 'FED. REP. OF GERMANY',
462
+ 'CQZ': '14',
463
+ 'STX': '000',
464
+ 'STX_STRING': '1D ORG',
465
+ 'CLASS': '1D',
466
+ 'ARRL_SECT': 'DX',
467
+ 'TX_PWR': '0',
468
+ 'OPERATOR': 'K6GTE',
469
+ 'STATION_CALLSIGN': 'K6GTE',
470
+ 'MY_GRIDSQUARE': 'DM13AT',
471
+ 'MY_CITY': 'ANAHEIM, CA',
472
+ 'MY_STATE': 'CA'
473
+ }
474
+
475
+ """
476
+ # print(f"\n{the_packet=}\n")
477
+ if ALTEREGO is not None:
478
+ ALTEREGO.callsign.setText(the_packet.get("CALL"))
479
+ ALTEREGO.contact["Call"] = the_packet.get("CALL", "")
480
+ ALTEREGO.contact["SNT"] = ALTEREGO.sent.text()
481
+ ALTEREGO.contact["RCV"] = ALTEREGO.receive.text()
482
+ my_grid = the_packet.get("MY_GRIDSQUARE", "")
483
+ if my_grid:
484
+ if len(my_grid) > 4:
485
+ my_grid = my_grid[:4]
486
+ their_grid = the_packet.get("GRIDSQUARE", "")
487
+ if their_grid:
488
+ if len(their_grid) > 4:
489
+ their_grid = their_grid[:4]
490
+ ALTEREGO.contact["NR"] = their_grid
491
+ if the_packet.get("SUBMODE"):
492
+ ALTEREGO.contact["Mode"] = the_packet.get("SUBMODE", "ERR")
493
+ else:
494
+ ALTEREGO.contact["Mode"] = the_packet.get("MODE", "ERR")
495
+ ALTEREGO.contact["Freq"] = round(float(the_packet.get("FREQ", "0.0")) * 1000, 2)
496
+ ALTEREGO.contact["QSXFreq"] = round(
497
+ float(the_packet.get("FREQ", "0.0")) * 1000, 2
498
+ )
499
+ ALTEREGO.contact["Band"] = get_logged_band(
500
+ str(int(float(the_packet.get("FREQ", "0.0")) * 1000000))
501
+ )
502
+ # print(f"\n{ALTEREGO.contact=}\n")
503
+ ALTEREGO.other_1.setText(my_grid)
504
+ ALTEREGO.other_2.setText(their_grid)
505
+ ALTEREGO.save_contact()
506
+
507
+
508
+ def process_esm(self, new_focused_widget=None, with_enter=False):
509
+ """ESM State Machine"""
510
+
511
+ # self.pref["run_state"]
512
+
513
+ # -----===== Assigned F-Keys =====-----
514
+ # self.esm_dict["CQ"]
515
+ # self.esm_dict["EXCH"]
516
+ # self.esm_dict["QRZ"]
517
+ # self.esm_dict["AGN"]
518
+ # self.esm_dict["HISCALL"]
519
+ # self.esm_dict["MYCALL"]
520
+ # self.esm_dict["QSOB4"]
521
+
522
+ # ----==== text fields ====----
523
+ # self.callsign
524
+ # self.sent
525
+ # self.receive
526
+ # self.other_1
527
+ # self.other_2
528
+
529
+ if new_focused_widget is not None:
530
+ self.current_widget = self.inputs_dict.get(new_focused_widget)
531
+
532
+ # print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}")
533
+
534
+ for a_button in [
535
+ self.esm_dict["CQ"],
536
+ self.esm_dict["EXCH"],
537
+ self.esm_dict["QRZ"],
538
+ self.esm_dict["AGN"],
539
+ self.esm_dict["HISCALL"],
540
+ self.esm_dict["MYCALL"],
541
+ self.esm_dict["QSOB4"],
542
+ ]:
543
+ if a_button is not None:
544
+ self.restore_button_color(a_button)
545
+
546
+ buttons_to_send = []
547
+
548
+ if self.pref.get("run_state"):
549
+ if self.current_widget == "callsign":
550
+ if len(self.callsign.text()) < 3:
551
+ self.make_button_green(self.esm_dict["CQ"])
552
+ buttons_to_send.append(self.esm_dict["CQ"])
553
+ elif len(self.callsign.text()) > 2:
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 in ["other_2"]:
560
+ if self.other_2.text() == "":
561
+ self.make_button_green(self.esm_dict["AGN"])
562
+ buttons_to_send.append(self.esm_dict["AGN"])
563
+ else:
564
+ self.make_button_green(self.esm_dict["QRZ"])
565
+ buttons_to_send.append(self.esm_dict["QRZ"])
566
+ buttons_to_send.append("LOGIT")
567
+
568
+ if with_enter is True and bool(len(buttons_to_send)):
569
+ for button in buttons_to_send:
570
+ if button:
571
+ if button == "LOGIT":
572
+ self.save_contact()
573
+ continue
574
+ self.process_function_key(button)
575
+ else:
576
+ if self.current_widget == "callsign":
577
+ if len(self.callsign.text()) > 2:
578
+ self.make_button_green(self.esm_dict["MYCALL"])
579
+ buttons_to_send.append(self.esm_dict["MYCALL"])
580
+
581
+ elif self.current_widget in ["other_2"]:
582
+ if self.other_2.text() == "":
583
+ self.make_button_green(self.esm_dict["AGN"])
584
+ buttons_to_send.append(self.esm_dict["AGN"])
585
+ else:
586
+ self.make_button_green(self.esm_dict["EXCH"])
587
+ buttons_to_send.append(self.esm_dict["EXCH"])
588
+ buttons_to_send.append("LOGIT")
589
+
590
+ if with_enter is True and bool(len(buttons_to_send)):
591
+ for button in buttons_to_send:
592
+ if button:
593
+ if button == "LOGIT":
594
+ self.save_contact()
595
+ continue
596
+ self.process_function_key(button)
597
+
598
+
599
+ def populate_history_info_line(self):
600
+ result = self.database.fetch_call_history(self.callsign.text())
601
+ if result:
602
+ self.history_info.setText(
603
+ f"{result.get('Call', '')}, {result.get('Name', '')}, {result.get('Loc1', '')}, {result.get('UserText','...')}"
604
+ )
605
+ else:
606
+ self.history_info.setText("")
607
+
608
+
609
+ def check_call_history(self):
610
+ """"""
611
+ result = self.database.fetch_call_history(self.callsign.text())
612
+ if result:
613
+ self.history_info.setText(f"{result.get('UserText','')}")
614
+ if self.other_2.text() == "":
615
+ self.other_2.setText(f"{result.get('Loc1', '')}")
616
+
617
+
618
+ # gridsquare
619
+ def get_mults(self):
620
+ """"""
621
+
622
+ mults = {}
623
+ mults["gridsquare"] = show_mults(self)
624
+ return mults
625
+
626
+
627
+ def just_points(self):
628
+ """"""
629
+ result = self.database.fetch_points()
630
+ if result is not None:
631
+ score = result.get("Points", "0")
632
+ if score is None:
633
+ score = "0"
634
+ return int(score)
635
+ return 0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: not1mm
3
- Version: 25.1.27
3
+ Version: 25.1.27.2
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
@@ -223,6 +223,7 @@ generated, 'cause I'm lazy, list of those who've submitted PR's.
223
223
  - ICWC MST
224
224
  - Japan International DX CW, SSB
225
225
  - K1USN Slow Speed Test
226
+ - Labre RS Digi
226
227
  - LZ DX
227
228
  - NAQP CW, RTTY, SSB
228
229
  - Phone Weekly Test
@@ -235,6 +236,7 @@ generated, 'cause I'm lazy, list of those who've submitted PR's.
235
236
 
236
237
  ## Recent Changes
237
238
 
239
+ - [25-1-27-1] Add LABRE-RS Digi
238
240
  - [25-1-27] Update pop up about updates...
239
241
  - [25-1-26] Add macros for MARK, SPOT, WIPE, RUN, SANDP.
240
242
  - [25-1-25-2] Add call history to REF CW and SSB.
@@ -33,7 +33,7 @@ not1mm/data/k6gte.not1mm-64.png,sha256=6ku45Gq1g5ezh04F07osoKRtanb3e4kbx5XdIEh3N
33
33
  not1mm/data/logwindow.ui,sha256=f7vULj96tHIQuR1nJMyvPHHcmVgzkhv9D1isyojsnFU,1458
34
34
  not1mm/data/logwindowx.ui,sha256=CwpI-h7cI1yqyldH9quKftsdHL5lTyL9ABOcf80nfqc,1632
35
35
  not1mm/data/main.ui,sha256=LEziByl_8nNTBYR0Z-6CgqDcMbsvQVgfWOfF-B9z3MQ,63537
36
- not1mm/data/new_contest.ui,sha256=Sc8HquH7BK0bmkypeK_HbfhArE6yaw02WONOUlRdmuA,23953
36
+ not1mm/data/new_contest.ui,sha256=UQNSl28_PrtVA6to2uKBCZTa7LCOh5peGOmuxIWHBw8,24063
37
37
  not1mm/data/not1mm.html,sha256=c9-mfjMwDt4f5pySUruz2gREW33CQ2_rCddM2z5CZQo,23273
38
38
  not1mm/data/opon.ui,sha256=QDicqAk2lORG2UWsHa6jHlsGn6uzrrI2R4HSAocpPes,2258
39
39
  not1mm/data/pickcontest.ui,sha256=4hPBszCglObThx_eIWtmK9CEcbr7WBjbB1rKZdI-o3I,1707
@@ -116,7 +116,7 @@ not1mm/lib/plugin_common.py,sha256=M5reDYM-v5IjAa2yTROvZTeTDkXYHb3U52W9mc9GxwA,1
116
116
  not1mm/lib/select_contest.py,sha256=WsptLuwkouIHeocJL3oZ6-eUfEnhpwdc-x7eMZ_TIVM,359
117
117
  not1mm/lib/settings.py,sha256=j5lIMLHJ-eqIaVr_QhI82gkbOl17_C-5suRkWbHYET8,14717
118
118
  not1mm/lib/super_check_partial.py,sha256=hwT2NRwobu0PLDyw6ltmbmcAtGBD02CKGFbgGWjXMqA,2334
119
- not1mm/lib/version.py,sha256=5twE3X_EhOERN68RFOMetqlYtjVyFM0GztcTbeKnV8Y,48
119
+ not1mm/lib/version.py,sha256=XjMh_RBKe95tt8IFtzLnUjE2QjqaeceLeQPn474P2gw,50
120
120
  not1mm/lib/versiontest.py,sha256=8vDNptuBBunn-1IGkjNaquehqBYUJyjrPSF8Igmd4_Y,1286
121
121
  not1mm/plugins/10_10_fall_cw.py,sha256=5QUyGMvGBC-HxcY_z9QbfuxSg3f7p6C9K4qhTxgZE7k,14719
122
122
  not1mm/plugins/10_10_spring_cw.py,sha256=XjYFM263WYyG6nVQzPObW4YC7Z9L93rixSOcVsxPvH4,14722
@@ -145,7 +145,7 @@ not1mm/plugins/cq_ww_rtty.py,sha256=RJywVSNujM4CxxTRCGKXhjmbz6OMzGR5eHSAmQcT6Pc,
145
145
  not1mm/plugins/cq_ww_ssb.py,sha256=uRMXaTfkIt7QJxQBaBAvc2fmT6ak26SzBBezd5k_hMc,17991
146
146
  not1mm/plugins/cwt.py,sha256=7BoKVrIywlHpP4f4_mrUyWKVsK6vujreb8jDWyXrwUc,17530
147
147
  not1mm/plugins/darc_xmas.py,sha256=p9JbOJlEoOsB86E5ciHdrY7L-10tnNEWuTxq9EfCNBM,18907
148
- not1mm/plugins/general_logging.py,sha256=gpZhoBr9fKpcTrefufmtvMHVrzlSqUsch64O8-oKhls,6915
148
+ not1mm/plugins/general_logging.py,sha256=gm33-pfbsc4Omz__ujAMMue8GGLIWvVzz0sZ6XOpKIo,9782
149
149
  not1mm/plugins/helvetia.py,sha256=ANsktNEXppSrxiIXeCwRd3GtFu27UjAp3cbA5wwmL2E,20015
150
150
  not1mm/plugins/iaru_fieldday_r1_cw.py,sha256=lueTnK50yRSMqASlktrhuFOJkSBDsQw4OyT9eYwpugU,17155
151
151
  not1mm/plugins/iaru_fieldday_r1_ssb.py,sha256=1lYxeo4j_piiFZ_db-vHIHT5c1jSeFPBuw6yf1kur6Y,17159
@@ -154,6 +154,7 @@ not1mm/plugins/icwc_mst.py,sha256=XfaIRIj0BxWvpWk2nmy_dMseVuKVOh-_m3UcIGOy6wI,16
154
154
  not1mm/plugins/jidx_cw.py,sha256=gSScw21ac2Rpdd7jspgh5gnH9JdiR8h3YOa-41B_T94,15881
155
155
  not1mm/plugins/jidx_ph.py,sha256=0E5xHs0WXh-x2Z6UC2PGqmLdIkn-jWbENOeLopr7rys,14830
156
156
  not1mm/plugins/k1usn_sst.py,sha256=WfRF-emC52IIjOEddGmEQ_gWlMqoBbhCQ7S56nAZ4M8,17134
157
+ not1mm/plugins/labre_rs_digi.py,sha256=nGlZ_wuB0DYZTk-nBW8Z10E-IZCasCENmbQXuz5BjVc,20041
157
158
  not1mm/plugins/lz-dx.py,sha256=HLU7FopHryEHPtAH2-mopeWSY6E_uwNgh8_sM27E2F0,19824
158
159
  not1mm/plugins/naqp_cw.py,sha256=Aq9bRn9uRm6PXd1WVckZJ4GTbiBcPFnPRQAydEVmeAs,18897
159
160
  not1mm/plugins/naqp_rtty.py,sha256=JbjsY9DvVexXdzoPE4k9zSmcYNEMQpB9lrxdRxl_ldc,22639
@@ -165,9 +166,9 @@ not1mm/plugins/ref_ssb.py,sha256=Z_XmMpYKcI5dZh4TQqvQDcz-cLpMzpDEKBnb5iHeBLQ,215
165
166
  not1mm/plugins/stew_perry_topband.py,sha256=D1hekmMbx-i4BhaP2uzOK3OzaVVMMdgcN3RmfweNqHo,15341
166
167
  not1mm/plugins/weekly_rtty.py,sha256=rdlIrsxBeuj-RQc5OStVNF7sGCtBK5t6inN5Z7DI4tw,20066
167
168
  not1mm/plugins/winter_field_day.py,sha256=JK4r1vfxs7aADR7ZYbjZniz3f5s3_ipSQDZ0GRNWC7I,15222
168
- not1mm-25.1.27.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
169
- not1mm-25.1.27.dist-info/METADATA,sha256=oh_anep06gz1OKHyV93o1THVRiKh4WM9bvYXmA5TjM8,35987
170
- not1mm-25.1.27.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
171
- not1mm-25.1.27.dist-info/entry_points.txt,sha256=pMcZk_0dxFgLkcUkF0Q874ojpwOmF3OL6EKw9LgvocM,47
172
- not1mm-25.1.27.dist-info/top_level.txt,sha256=0YmTxEcDzQlzXub-lXASvoLpg_mt1c2thb5cVkDf5J4,7
173
- not1mm-25.1.27.dist-info/RECORD,,
169
+ not1mm-25.1.27.2.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
170
+ not1mm-25.1.27.2.dist-info/METADATA,sha256=lGYUOPEI6LSuYi5mbYy9JpC633J053_HVOg4-7uN6ME,36037
171
+ not1mm-25.1.27.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
172
+ not1mm-25.1.27.2.dist-info/entry_points.txt,sha256=pMcZk_0dxFgLkcUkF0Q874ojpwOmF3OL6EKw9LgvocM,47
173
+ not1mm-25.1.27.2.dist-info/top_level.txt,sha256=0YmTxEcDzQlzXub-lXASvoLpg_mt1c2thb5cVkDf5J4,7
174
+ not1mm-25.1.27.2.dist-info/RECORD,,