not1mm 24.11.21__py3-none-any.whl → 24.12.3.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.
@@ -284,8 +284,11 @@ class CAT:
284
284
  if self.rigctrlsocket:
285
285
  try:
286
286
  self.online = True
287
- self.rigctrlsocket.send(b"f\n")
288
- return self.__get_serial_string().strip()
287
+ self.rigctrlsocket.send(b"|f\n")
288
+ report = self.__get_serial_string().strip()
289
+ if "get_freq:|" in report and "RPRT 0" in report:
290
+ seg_rpt = report.split("|")
291
+ return seg_rpt[1].split(" ")[1]
289
292
  except socket.error as exception:
290
293
  self.online = False
291
294
  logger.debug(f"{exception=}")
@@ -334,11 +337,12 @@ class CAT:
334
337
  if self.rigctrlsocket:
335
338
  try:
336
339
  self.online = True
337
- self.rigctrlsocket.send(b"m\n")
338
- mode = self.__get_serial_string()
339
- mode = mode.strip().split()[0]
340
- # logger.debug("%s", mode)
341
- return mode
340
+ self.rigctrlsocket.send(b"|m\n")
341
+ # get_mode:|Mode: CW|Passband: 500|RPRT 0
342
+ report = self.__get_serial_string().strip()
343
+ if "getmode:|" in report and "RPRT 0" in report:
344
+ seg_rpt = report.split("|")
345
+ return seg_rpt[1].split(" ")[1]
342
346
  except IndexError as exception:
343
347
  logger.debug("%s", f"{exception}")
344
348
  except socket.error as exception:
@@ -382,11 +386,13 @@ class CAT:
382
386
  if self.rigctrlsocket:
383
387
  try:
384
388
  self.online = True
385
- self.rigctrlsocket.send(b"m\n")
386
- mode = self.__get_serial_string()
387
- mode = mode.strip().split()[1]
388
- # logger.debug("%s", mode)
389
- return mode
389
+ self.rigctrlsocket.send(b"|m\n")
390
+ # get_mode:|Mode: CW|Passband: 500|RPRT 0
391
+ report = self.__get_serial_string().strip()
392
+ if "getmode:|" in report and "RPRT 0" in report:
393
+ seg_rpt = report.split("|")
394
+ return seg_rpt[2].split(" ")[1]
395
+
390
396
  except IndexError as exception:
391
397
  logger.debug("%s", f"{exception}")
392
398
  except socket.error as exception:
@@ -425,8 +431,12 @@ class CAT:
425
431
  if self.rigctrlsocket:
426
432
  try:
427
433
  self.online = True
428
- self.rigctrlsocket.send(b"l RFPOWER\n")
429
- return int(float(self.__get_serial_string().strip()) * 100)
434
+ self.rigctrlsocket.send(b"|l RFPOWER\n")
435
+ # get_level: RFPOWER|0.000000|RPRT 0
436
+ report = self.__get_serial_string().strip()
437
+ if "get_level: RFPOWER|" in report and "RPRT 0" in report:
438
+ seg_rpt = report.split("|")
439
+ return int(float(seg_rpt[1]) * 100)
430
440
  except socket.error as exception:
431
441
  self.online = False
432
442
  logger.debug("getpower_rigctld: %s", f"{exception}")
not1mm/lib/database.py CHANGED
@@ -695,6 +695,23 @@ class DataBase:
695
695
  logger.debug("%s", exception)
696
696
  return {}
697
697
 
698
+ def fetch_exchange1_unique_count(self) -> dict:
699
+ """
700
+ Fetch count of unique countries
701
+ {exch1_count: count}
702
+ """
703
+ try:
704
+ with sqlite3.connect(self.database) as conn:
705
+ conn.row_factory = self.row_factory
706
+ cursor = conn.cursor()
707
+ cursor.execute(
708
+ f"select count(DISTINCT(Exchange1)) as exch1_count from dxlog where Exchange1 != '' and ContestNR = {self.current_contest};"
709
+ )
710
+ return cursor.fetchone()
711
+ except sqlite3.OperationalError as exception:
712
+ logger.debug("%s", exception)
713
+ return {}
714
+
698
715
  def fetch_arrldx_country_band_count(self) -> dict:
699
716
  """
700
717
  returns dict with count of unique NR.
not1mm/lib/settings.py CHANGED
@@ -99,6 +99,7 @@ class Settings(QtWidgets.QDialog):
99
99
  )
100
100
  self.rigcontrolip_field.setText(str(self.preference.get("CAT_ip", "")))
101
101
  self.rigcontrolport_field.setText(str(self.preference.get("CAT_port", "")))
102
+ self.catpoll_field.setText(str(self.preference.get("CAT_polldelta", 500)))
102
103
  self.userigctld_radioButton.setChecked(bool(self.preference.get("userigctld")))
103
104
  self.useflrig_radioButton.setChecked(bool(self.preference.get("useflrig")))
104
105
 
@@ -215,6 +216,10 @@ class Settings(QtWidgets.QDialog):
215
216
  self.preference["CAT_port"] = int(self.rigcontrolport_field.text())
216
217
  except ValueError:
217
218
  ...
219
+ try:
220
+ self.preference["CAT_polldelta"] = int(self.catpoll_field.text())
221
+ except ValueError:
222
+ ...
218
223
  self.preference["userigctld"] = self.userigctld_radioButton.isChecked()
219
224
  self.preference["useflrig"] = self.useflrig_radioButton.isChecked()
220
225
  self.preference["cwip"] = self.cwip_field.text()
not1mm/lib/version.py CHANGED
@@ -1,3 +1,3 @@
1
1
  """It's the version"""
2
2
 
3
- __version__ = "24.11.21"
3
+ __version__ = "24.12.3.1"
@@ -359,3 +359,94 @@ def cabrillo(self, file_encoding):
359
359
 
360
360
  def recalculate_mults(self):
361
361
  """Recalculates multipliers after change in logged qso."""
362
+
363
+
364
+ def process_esm(self, new_focused_widget=None, with_enter=False):
365
+ """ESM State Machine"""
366
+
367
+ # self.pref["run_state"]
368
+
369
+ # -----===== Assigned F-Keys =====-----
370
+ # self.esm_dict["CQ"]
371
+ # self.esm_dict["EXCH"]
372
+ # self.esm_dict["QRZ"]
373
+ # self.esm_dict["AGN"]
374
+ # self.esm_dict["HISCALL"]
375
+ # self.esm_dict["MYCALL"]
376
+ # self.esm_dict["QSOB4"]
377
+
378
+ # ----==== text fields ====----
379
+ # self.callsign
380
+ # self.sent
381
+ # self.receive
382
+ # self.other_1
383
+ # self.other_2
384
+
385
+ if new_focused_widget is not None:
386
+ self.current_widget = self.inputs_dict.get(new_focused_widget)
387
+
388
+ # print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}")
389
+
390
+ for a_button in [
391
+ self.esm_dict["CQ"],
392
+ self.esm_dict["EXCH"],
393
+ self.esm_dict["QRZ"],
394
+ self.esm_dict["AGN"],
395
+ self.esm_dict["HISCALL"],
396
+ self.esm_dict["MYCALL"],
397
+ self.esm_dict["QSOB4"],
398
+ ]:
399
+ if a_button is not None:
400
+ self.restore_button_color(a_button)
401
+
402
+ buttons_to_send = []
403
+
404
+ if self.pref.get("run_state"):
405
+ if self.current_widget == "callsign":
406
+ if len(self.callsign.text()) < 3:
407
+ self.make_button_green(self.esm_dict["CQ"])
408
+ buttons_to_send.append(self.esm_dict["CQ"])
409
+ elif len(self.callsign.text()) > 2:
410
+ self.make_button_green(self.esm_dict["HISCALL"])
411
+ self.make_button_green(self.esm_dict["EXCH"])
412
+ buttons_to_send.append(self.esm_dict["HISCALL"])
413
+ buttons_to_send.append(self.esm_dict["EXCH"])
414
+
415
+ elif self.current_widget in ["other_2"]:
416
+ if self.other_2.text() == "":
417
+ self.make_button_green(self.esm_dict["AGN"])
418
+ buttons_to_send.append(self.esm_dict["AGN"])
419
+ else:
420
+ self.make_button_green(self.esm_dict["QRZ"])
421
+ buttons_to_send.append(self.esm_dict["QRZ"])
422
+ buttons_to_send.append("LOGIT")
423
+
424
+ if with_enter is True and bool(len(buttons_to_send)):
425
+ for button in buttons_to_send:
426
+ if button:
427
+ if button == "LOGIT":
428
+ self.save_contact()
429
+ continue
430
+ self.process_function_key(button)
431
+ else:
432
+ if self.current_widget == "callsign":
433
+ if len(self.callsign.text()) > 2:
434
+ self.make_button_green(self.esm_dict["MYCALL"])
435
+ buttons_to_send.append(self.esm_dict["MYCALL"])
436
+
437
+ elif self.current_widget in ["other_2"]:
438
+ if self.other_2.text() == "":
439
+ self.make_button_green(self.esm_dict["AGN"])
440
+ buttons_to_send.append(self.esm_dict["AGN"])
441
+ else:
442
+ self.make_button_green(self.esm_dict["EXCH"])
443
+ buttons_to_send.append(self.esm_dict["EXCH"])
444
+ buttons_to_send.append("LOGIT")
445
+
446
+ if with_enter is True and bool(len(buttons_to_send)):
447
+ for button in buttons_to_send:
448
+ if button:
449
+ if button == "LOGIT":
450
+ self.save_contact()
451
+ continue
452
+ self.process_function_key(button)
@@ -358,3 +358,94 @@ def cabrillo(self, file_encoding):
358
358
 
359
359
  def recalculate_mults(self):
360
360
  """Recalculates multipliers after change in logged qso."""
361
+
362
+
363
+ def process_esm(self, new_focused_widget=None, with_enter=False):
364
+ """ESM State Machine"""
365
+
366
+ # self.pref["run_state"]
367
+
368
+ # -----===== Assigned F-Keys =====-----
369
+ # self.esm_dict["CQ"]
370
+ # self.esm_dict["EXCH"]
371
+ # self.esm_dict["QRZ"]
372
+ # self.esm_dict["AGN"]
373
+ # self.esm_dict["HISCALL"]
374
+ # self.esm_dict["MYCALL"]
375
+ # self.esm_dict["QSOB4"]
376
+
377
+ # ----==== text fields ====----
378
+ # self.callsign
379
+ # self.sent
380
+ # self.receive
381
+ # self.other_1
382
+ # self.other_2
383
+
384
+ if new_focused_widget is not None:
385
+ self.current_widget = self.inputs_dict.get(new_focused_widget)
386
+
387
+ # print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}")
388
+
389
+ for a_button in [
390
+ self.esm_dict["CQ"],
391
+ self.esm_dict["EXCH"],
392
+ self.esm_dict["QRZ"],
393
+ self.esm_dict["AGN"],
394
+ self.esm_dict["HISCALL"],
395
+ self.esm_dict["MYCALL"],
396
+ self.esm_dict["QSOB4"],
397
+ ]:
398
+ if a_button is not None:
399
+ self.restore_button_color(a_button)
400
+
401
+ buttons_to_send = []
402
+
403
+ if self.pref.get("run_state"):
404
+ if self.current_widget == "callsign":
405
+ if len(self.callsign.text()) < 3:
406
+ self.make_button_green(self.esm_dict["CQ"])
407
+ buttons_to_send.append(self.esm_dict["CQ"])
408
+ elif len(self.callsign.text()) > 2:
409
+ self.make_button_green(self.esm_dict["HISCALL"])
410
+ self.make_button_green(self.esm_dict["EXCH"])
411
+ buttons_to_send.append(self.esm_dict["HISCALL"])
412
+ buttons_to_send.append(self.esm_dict["EXCH"])
413
+
414
+ elif self.current_widget in ["other_2"]:
415
+ if self.other_2.text() == "":
416
+ self.make_button_green(self.esm_dict["AGN"])
417
+ buttons_to_send.append(self.esm_dict["AGN"])
418
+ else:
419
+ self.make_button_green(self.esm_dict["QRZ"])
420
+ buttons_to_send.append(self.esm_dict["QRZ"])
421
+ buttons_to_send.append("LOGIT")
422
+
423
+ if with_enter is True and bool(len(buttons_to_send)):
424
+ for button in buttons_to_send:
425
+ if button:
426
+ if button == "LOGIT":
427
+ self.save_contact()
428
+ continue
429
+ self.process_function_key(button)
430
+ else:
431
+ if self.current_widget == "callsign":
432
+ if len(self.callsign.text()) > 2:
433
+ self.make_button_green(self.esm_dict["MYCALL"])
434
+ buttons_to_send.append(self.esm_dict["MYCALL"])
435
+
436
+ elif self.current_widget in ["other_2"]:
437
+ if self.other_2.text() == "":
438
+ self.make_button_green(self.esm_dict["AGN"])
439
+ buttons_to_send.append(self.esm_dict["AGN"])
440
+ else:
441
+ self.make_button_green(self.esm_dict["EXCH"])
442
+ buttons_to_send.append(self.esm_dict["EXCH"])
443
+ buttons_to_send.append("LOGIT")
444
+
445
+ if with_enter is True and bool(len(buttons_to_send)):
446
+ for button in buttons_to_send:
447
+ if button:
448
+ if button == "LOGIT":
449
+ self.save_contact()
450
+ continue
451
+ self.process_function_key(button)
@@ -362,3 +362,94 @@ def cabrillo(self, file_encoding):
362
362
 
363
363
  def recalculate_mults(self):
364
364
  """Recalculates multipliers after change in logged qso."""
365
+
366
+
367
+ def process_esm(self, new_focused_widget=None, with_enter=False):
368
+ """ESM State Machine"""
369
+
370
+ # self.pref["run_state"]
371
+
372
+ # -----===== Assigned F-Keys =====-----
373
+ # self.esm_dict["CQ"]
374
+ # self.esm_dict["EXCH"]
375
+ # self.esm_dict["QRZ"]
376
+ # self.esm_dict["AGN"]
377
+ # self.esm_dict["HISCALL"]
378
+ # self.esm_dict["MYCALL"]
379
+ # self.esm_dict["QSOB4"]
380
+
381
+ # ----==== text fields ====----
382
+ # self.callsign
383
+ # self.sent
384
+ # self.receive
385
+ # self.other_1
386
+ # self.other_2
387
+
388
+ if new_focused_widget is not None:
389
+ self.current_widget = self.inputs_dict.get(new_focused_widget)
390
+
391
+ # print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}")
392
+
393
+ for a_button in [
394
+ self.esm_dict["CQ"],
395
+ self.esm_dict["EXCH"],
396
+ self.esm_dict["QRZ"],
397
+ self.esm_dict["AGN"],
398
+ self.esm_dict["HISCALL"],
399
+ self.esm_dict["MYCALL"],
400
+ self.esm_dict["QSOB4"],
401
+ ]:
402
+ if a_button is not None:
403
+ self.restore_button_color(a_button)
404
+
405
+ buttons_to_send = []
406
+
407
+ if self.pref.get("run_state"):
408
+ if self.current_widget == "callsign":
409
+ if len(self.callsign.text()) < 3:
410
+ self.make_button_green(self.esm_dict["CQ"])
411
+ buttons_to_send.append(self.esm_dict["CQ"])
412
+ elif len(self.callsign.text()) > 2:
413
+ self.make_button_green(self.esm_dict["HISCALL"])
414
+ self.make_button_green(self.esm_dict["EXCH"])
415
+ buttons_to_send.append(self.esm_dict["HISCALL"])
416
+ buttons_to_send.append(self.esm_dict["EXCH"])
417
+
418
+ elif self.current_widget in ["other_2"]:
419
+ if self.other_2.text() == "":
420
+ self.make_button_green(self.esm_dict["AGN"])
421
+ buttons_to_send.append(self.esm_dict["AGN"])
422
+ else:
423
+ self.make_button_green(self.esm_dict["QRZ"])
424
+ buttons_to_send.append(self.esm_dict["QRZ"])
425
+ buttons_to_send.append("LOGIT")
426
+
427
+ if with_enter is True and bool(len(buttons_to_send)):
428
+ for button in buttons_to_send:
429
+ if button:
430
+ if button == "LOGIT":
431
+ self.save_contact()
432
+ continue
433
+ self.process_function_key(button)
434
+ else:
435
+ if self.current_widget == "callsign":
436
+ if len(self.callsign.text()) > 2:
437
+ self.make_button_green(self.esm_dict["MYCALL"])
438
+ buttons_to_send.append(self.esm_dict["MYCALL"])
439
+
440
+ elif self.current_widget in ["other_2"]:
441
+ if self.other_2.text() == "":
442
+ self.make_button_green(self.esm_dict["AGN"])
443
+ buttons_to_send.append(self.esm_dict["AGN"])
444
+ else:
445
+ self.make_button_green(self.esm_dict["EXCH"])
446
+ buttons_to_send.append(self.esm_dict["EXCH"])
447
+ buttons_to_send.append("LOGIT")
448
+
449
+ if with_enter is True and bool(len(buttons_to_send)):
450
+ for button in buttons_to_send:
451
+ if button:
452
+ if button == "LOGIT":
453
+ self.save_contact()
454
+ continue
455
+ self.process_function_key(button)
@@ -360,3 +360,94 @@ def cabrillo(self, file_encoding):
360
360
 
361
361
  def recalculate_mults(self):
362
362
  """Recalculates multipliers after change in logged qso."""
363
+
364
+
365
+ def process_esm(self, new_focused_widget=None, with_enter=False):
366
+ """ESM State Machine"""
367
+
368
+ # self.pref["run_state"]
369
+
370
+ # -----===== Assigned F-Keys =====-----
371
+ # self.esm_dict["CQ"]
372
+ # self.esm_dict["EXCH"]
373
+ # self.esm_dict["QRZ"]
374
+ # self.esm_dict["AGN"]
375
+ # self.esm_dict["HISCALL"]
376
+ # self.esm_dict["MYCALL"]
377
+ # self.esm_dict["QSOB4"]
378
+
379
+ # ----==== text fields ====----
380
+ # self.callsign
381
+ # self.sent
382
+ # self.receive
383
+ # self.other_1
384
+ # self.other_2
385
+
386
+ if new_focused_widget is not None:
387
+ self.current_widget = self.inputs_dict.get(new_focused_widget)
388
+
389
+ # print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}")
390
+
391
+ for a_button in [
392
+ self.esm_dict["CQ"],
393
+ self.esm_dict["EXCH"],
394
+ self.esm_dict["QRZ"],
395
+ self.esm_dict["AGN"],
396
+ self.esm_dict["HISCALL"],
397
+ self.esm_dict["MYCALL"],
398
+ self.esm_dict["QSOB4"],
399
+ ]:
400
+ if a_button is not None:
401
+ self.restore_button_color(a_button)
402
+
403
+ buttons_to_send = []
404
+
405
+ if self.pref.get("run_state"):
406
+ if self.current_widget == "callsign":
407
+ if len(self.callsign.text()) < 3:
408
+ self.make_button_green(self.esm_dict["CQ"])
409
+ buttons_to_send.append(self.esm_dict["CQ"])
410
+ elif len(self.callsign.text()) > 2:
411
+ self.make_button_green(self.esm_dict["HISCALL"])
412
+ self.make_button_green(self.esm_dict["EXCH"])
413
+ buttons_to_send.append(self.esm_dict["HISCALL"])
414
+ buttons_to_send.append(self.esm_dict["EXCH"])
415
+
416
+ elif self.current_widget in ["other_2"]:
417
+ if self.other_2.text() == "":
418
+ self.make_button_green(self.esm_dict["AGN"])
419
+ buttons_to_send.append(self.esm_dict["AGN"])
420
+ else:
421
+ self.make_button_green(self.esm_dict["QRZ"])
422
+ buttons_to_send.append(self.esm_dict["QRZ"])
423
+ buttons_to_send.append("LOGIT")
424
+
425
+ if with_enter is True and bool(len(buttons_to_send)):
426
+ for button in buttons_to_send:
427
+ if button:
428
+ if button == "LOGIT":
429
+ self.save_contact()
430
+ continue
431
+ self.process_function_key(button)
432
+ else:
433
+ if self.current_widget == "callsign":
434
+ if len(self.callsign.text()) > 2:
435
+ self.make_button_green(self.esm_dict["MYCALL"])
436
+ buttons_to_send.append(self.esm_dict["MYCALL"])
437
+
438
+ elif self.current_widget in ["other_2"]:
439
+ if self.other_2.text() == "":
440
+ self.make_button_green(self.esm_dict["AGN"])
441
+ buttons_to_send.append(self.esm_dict["AGN"])
442
+ else:
443
+ self.make_button_green(self.esm_dict["EXCH"])
444
+ buttons_to_send.append(self.esm_dict["EXCH"])
445
+ buttons_to_send.append("LOGIT")
446
+
447
+ if with_enter is True and bool(len(buttons_to_send)):
448
+ for button in buttons_to_send:
449
+ if button:
450
+ if button == "LOGIT":
451
+ self.save_contact()
452
+ continue
453
+ self.process_function_key(button)
@@ -441,3 +441,113 @@ def cabrillo(self, file_encoding):
441
441
 
442
442
  def recalculate_mults(self):
443
443
  """Recalculates multipliers after change in logged qso."""
444
+
445
+
446
+ def process_esm(self, new_focused_widget=None, with_enter=False):
447
+ """ESM State Machine"""
448
+
449
+ # self.pref["run_state"]
450
+
451
+ # -----===== Assigned F-Keys =====-----
452
+ # self.esm_dict["CQ"]
453
+ # self.esm_dict["EXCH"]
454
+ # self.esm_dict["QRZ"]
455
+ # self.esm_dict["AGN"]
456
+ # self.esm_dict["HISCALL"]
457
+ # self.esm_dict["MYCALL"]
458
+ # self.esm_dict["QSOB4"]
459
+
460
+ # ----==== text fields ====----
461
+ # self.callsign
462
+ # self.sent
463
+ # self.receive
464
+ # self.other_1
465
+ # self.other_2
466
+
467
+ if new_focused_widget is not None:
468
+ self.current_widget = self.inputs_dict.get(new_focused_widget)
469
+
470
+ # print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}")
471
+
472
+ for a_button in [
473
+ self.esm_dict["CQ"],
474
+ self.esm_dict["EXCH"],
475
+ self.esm_dict["QRZ"],
476
+ self.esm_dict["AGN"],
477
+ self.esm_dict["HISCALL"],
478
+ self.esm_dict["MYCALL"],
479
+ self.esm_dict["QSOB4"],
480
+ ]:
481
+ if a_button is not None:
482
+ self.restore_button_color(a_button)
483
+
484
+ buttons_to_send = []
485
+
486
+ if self.pref.get("run_state"):
487
+ if self.current_widget == "callsign":
488
+ if len(self.callsign.text()) < 3:
489
+ self.make_button_green(self.esm_dict["CQ"])
490
+ buttons_to_send.append(self.esm_dict["CQ"])
491
+ elif len(self.callsign.text()) > 2:
492
+ self.make_button_green(self.esm_dict["HISCALL"])
493
+ self.make_button_green(self.esm_dict["EXCH"])
494
+ buttons_to_send.append(self.esm_dict["HISCALL"])
495
+ buttons_to_send.append(self.esm_dict["EXCH"])
496
+
497
+ elif self.current_widget in ["other_2"]:
498
+ if self.other_2.text() == "":
499
+ self.make_button_green(self.esm_dict["AGN"])
500
+ buttons_to_send.append(self.esm_dict["AGN"])
501
+ else:
502
+ self.make_button_green(self.esm_dict["QRZ"])
503
+ buttons_to_send.append(self.esm_dict["QRZ"])
504
+ buttons_to_send.append("LOGIT")
505
+
506
+ if with_enter is True and bool(len(buttons_to_send)):
507
+ for button in buttons_to_send:
508
+ if button:
509
+ if button == "LOGIT":
510
+ self.save_contact()
511
+ continue
512
+ self.process_function_key(button)
513
+ else:
514
+ if self.current_widget == "callsign":
515
+ if len(self.callsign.text()) > 2:
516
+ self.make_button_green(self.esm_dict["MYCALL"])
517
+ buttons_to_send.append(self.esm_dict["MYCALL"])
518
+
519
+ elif self.current_widget in ["other_2"]:
520
+ if self.other_2.text() == "":
521
+ self.make_button_green(self.esm_dict["AGN"])
522
+ buttons_to_send.append(self.esm_dict["AGN"])
523
+ else:
524
+ self.make_button_green(self.esm_dict["EXCH"])
525
+ buttons_to_send.append(self.esm_dict["EXCH"])
526
+ buttons_to_send.append("LOGIT")
527
+
528
+ if with_enter is True and bool(len(buttons_to_send)):
529
+ for button in buttons_to_send:
530
+ if button:
531
+ if button == "LOGIT":
532
+ self.save_contact()
533
+ continue
534
+ self.process_function_key(button)
535
+
536
+
537
+ def populate_history_info_line(self):
538
+ result = self.database.fetch_call_history(self.callsign.text())
539
+ if result:
540
+ self.history_info.setText(
541
+ f"{result.get('Call', '')}, {result.get('Name', '')}, {result.get('State', '')}, {result.get('UserText','...')}"
542
+ )
543
+ else:
544
+ self.history_info.setText("")
545
+
546
+
547
+ def check_call_history(self):
548
+ """"""
549
+ result = self.database.fetch_call_history(self.callsign.text())
550
+ if result:
551
+ self.history_info.setText(f"{result.get('UserText','')}")
552
+ if self.other_2.text() == "":
553
+ self.other_2.setText(f"{result.get('State', '')}")