not1mm 25.3.19__py3-none-any.whl → 25.3.23__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/__main__.py +51 -2
- not1mm/data/main.ui +19 -2
- not1mm/data/new_contest.ui +5 -0
- not1mm/data/statistics.ui +47 -0
- not1mm/lib/version.py +1 -1
- not1mm/plugins/darc_vhf.py +44 -44
- not1mm/plugins/ea_majistad_cw.py +2 -2
- not1mm/plugins/ea_majistad_ssb.py +727 -0
- not1mm/statistics.py +152 -0
- {not1mm-25.3.19.dist-info → not1mm-25.3.23.dist-info}/METADATA +7 -3
- {not1mm-25.3.19.dist-info → not1mm-25.3.23.dist-info}/RECORD +15 -12
- {not1mm-25.3.19.dist-info → not1mm-25.3.23.dist-info}/WHEEL +1 -1
- {not1mm-25.3.19.dist-info → not1mm-25.3.23.dist-info}/entry_points.txt +0 -0
- {not1mm-25.3.19.dist-info → not1mm-25.3.23.dist-info/licenses}/LICENSE +0 -0
- {not1mm-25.3.19.dist-info → not1mm-25.3.23.dist-info}/top_level.txt +0 -0
not1mm/__main__.py
CHANGED
@@ -68,6 +68,7 @@ from not1mm.checkwindow import CheckWindow
|
|
68
68
|
from not1mm.bandmap import BandMapWindow
|
69
69
|
from not1mm.vfo import VfoWindow
|
70
70
|
from not1mm.ratewindow import RateWindow
|
71
|
+
from not1mm.statistics import StatsWindow
|
71
72
|
from not1mm.radio import Radio
|
72
73
|
from not1mm.voice_keying import Voice
|
73
74
|
from not1mm.lookupservice import LookupService
|
@@ -132,6 +133,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
132
133
|
"checkwindow": False,
|
133
134
|
"vfowindow": False,
|
134
135
|
"ratewindow": False,
|
136
|
+
"statisticswindow": False,
|
135
137
|
"darkmode": True,
|
136
138
|
}
|
137
139
|
appstarted = False
|
@@ -177,6 +179,8 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
177
179
|
bandmap_window = None
|
178
180
|
vfo_window = None
|
179
181
|
rate_window = None
|
182
|
+
statistics_window = None
|
183
|
+
settings = None
|
180
184
|
lookup_service = None
|
181
185
|
fldigi_util = None
|
182
186
|
rtc_service = None
|
@@ -238,6 +242,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
238
242
|
self.actionBandmap.triggered.connect(self.launch_bandmap_window)
|
239
243
|
self.actionCheck_Window.triggered.connect(self.launch_check_window)
|
240
244
|
self.actionRate_Window.triggered.connect(self.launch_rate_window)
|
245
|
+
self.actionStatistics.triggered.connect(self.launch_stats_window)
|
241
246
|
self.actionVFO.triggered.connect(self.launch_vfo)
|
242
247
|
self.actionRecalculate_Mults.triggered.connect(self.recalculate_mults)
|
243
248
|
self.actionLoad_Call_History_File.triggered.connect(self.load_call_history)
|
@@ -249,7 +254,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
249
254
|
lambda x: self.generate_cabrillo("utf-8")
|
250
255
|
)
|
251
256
|
self.actionGenerate_ADIF.triggered.connect(self.generate_adif)
|
252
|
-
self.
|
257
|
+
self.actionGenerate_EDI.triggered.connect(self.generate_edi)
|
253
258
|
|
254
259
|
self.actionConfiguration_Settings.triggered.connect(
|
255
260
|
self.edit_configuration_settings
|
@@ -654,6 +659,17 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
654
659
|
self.rate_window.hide()
|
655
660
|
self.rate_window.message.connect(self.dockwidget_message)
|
656
661
|
|
662
|
+
self.show_splash_msg("Setting up StatisticsWindow.")
|
663
|
+
self.statistics_window = StatsWindow()
|
664
|
+
self.statistics_window.setObjectName("statistics-window")
|
665
|
+
if os.environ.get("WAYLAND_DISPLAY") and old_Qt is True:
|
666
|
+
self.statistics_window.setFeatures(dockfeatures)
|
667
|
+
self.addDockWidget(
|
668
|
+
Qt.DockWidgetArea.RightDockWidgetArea, self.statistics_window
|
669
|
+
)
|
670
|
+
self.statistics_window.hide()
|
671
|
+
self.statistics_window.message.connect(self.dockwidget_message)
|
672
|
+
|
657
673
|
self.show_splash_msg("Setting up VFOWindow.")
|
658
674
|
self.vfo_window = VfoWindow()
|
659
675
|
self.vfo_window.setObjectName("vfo-window")
|
@@ -714,6 +730,15 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
714
730
|
self.rate_window.hide()
|
715
731
|
self.rate_window.setActive(False)
|
716
732
|
|
733
|
+
self.actionStatistics.setChecked(self.pref.get("statisticswindow", False))
|
734
|
+
if self.actionStatistics.isChecked():
|
735
|
+
self.statistics_window.show()
|
736
|
+
self.statistics_window.setActive(True)
|
737
|
+
self.statistics_window.get_run_and_total_qs()
|
738
|
+
else:
|
739
|
+
self.statistics_window.hide()
|
740
|
+
self.statistics_window.setActive(False)
|
741
|
+
|
717
742
|
self.actionVFO.setChecked(self.pref.get("vfowindow", False))
|
718
743
|
if self.actionVFO.isChecked():
|
719
744
|
self.vfo_window.show()
|
@@ -990,6 +1015,8 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
990
1015
|
self.vfo_window.msg_from_main(cmd)
|
991
1016
|
if self.rate_window:
|
992
1017
|
self.rate_window.msg_from_main(cmd)
|
1018
|
+
if self.statistics_window:
|
1019
|
+
self.statistics_window.msg_from_main(cmd)
|
993
1020
|
|
994
1021
|
if setdarkmode:
|
995
1022
|
darkPalette = QPalette()
|
@@ -1331,6 +1358,9 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1331
1358
|
self.log_window.msg_from_main(cmd)
|
1332
1359
|
if self.rate_window:
|
1333
1360
|
self.rate_window.msg_from_main(cmd)
|
1361
|
+
if self.statistics_window:
|
1362
|
+
self.statistics_window.msg_from_main(cmd)
|
1363
|
+
|
1334
1364
|
self.clearinputs()
|
1335
1365
|
self.edit_station_settings()
|
1336
1366
|
|
@@ -1370,6 +1400,9 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1370
1400
|
self.log_window.msg_from_main(cmd)
|
1371
1401
|
if self.rate_window:
|
1372
1402
|
self.rate_window.msg_from_main(cmd)
|
1403
|
+
if self.statistics_window:
|
1404
|
+
self.statistics_window.msg_from_main(cmd)
|
1405
|
+
|
1373
1406
|
self.clearinputs()
|
1374
1407
|
self.open_contest()
|
1375
1408
|
|
@@ -1662,6 +1695,9 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1662
1695
|
self.log_window.msg_from_main(cmd)
|
1663
1696
|
if self.rate_window:
|
1664
1697
|
self.rate_window.msg_from_main(cmd)
|
1698
|
+
if self.statistics_window:
|
1699
|
+
self.statistics_window.msg_from_main(cmd)
|
1700
|
+
|
1665
1701
|
if hasattr(self.contest, "columns"):
|
1666
1702
|
cmd = {}
|
1667
1703
|
cmd["cmd"] = "SHOWCOLUMNS"
|
@@ -1884,6 +1920,17 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
1884
1920
|
self.rate_window.hide()
|
1885
1921
|
self.rate_window.setActive(False)
|
1886
1922
|
|
1923
|
+
def launch_stats_window(self) -> None:
|
1924
|
+
"""Launch the check window"""
|
1925
|
+
self.pref["statisticswindow"] = self.actionStatistics.isChecked()
|
1926
|
+
self.write_preference()
|
1927
|
+
if self.actionStatistics.isChecked():
|
1928
|
+
self.statistics_window.show()
|
1929
|
+
self.statistics_window.setActive(True)
|
1930
|
+
else:
|
1931
|
+
self.statistics_window.hide()
|
1932
|
+
self.statistics_window.setActive(False)
|
1933
|
+
|
1887
1934
|
def launch_vfo(self) -> None:
|
1888
1935
|
"""Launch the VFO window"""
|
1889
1936
|
self.pref["vfowindow"] = self.actionVFO.isChecked()
|
@@ -2535,6 +2582,8 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
2535
2582
|
self.log_window.msg_from_main(cmd)
|
2536
2583
|
if self.check_window:
|
2537
2584
|
self.check_window.msg_from_main(cmd)
|
2585
|
+
if self.statistics_window:
|
2586
|
+
self.statistics_window.msg_from_main(cmd)
|
2538
2587
|
|
2539
2588
|
def update_rtc_xml(self):
|
2540
2589
|
"""Update RTC XML"""
|
@@ -3332,7 +3381,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
3332
3381
|
if "ARRL Sweepstakes" in self.contest.name:
|
3333
3382
|
self.contest.parse_exchange(self)
|
3334
3383
|
return
|
3335
|
-
if hasattr(self.contest, "call_parse_exchange_on_edit"):
|
3384
|
+
if hasattr(self.contest, "call_parse_exchange_on_edit"):
|
3336
3385
|
if self.contest.advance_on_space:
|
3337
3386
|
self.contest.parse_exchange(self)
|
3338
3387
|
if hasattr(self.contest, "advance_on_space"):
|
not1mm/data/main.ui
CHANGED
@@ -1511,10 +1511,11 @@
|
|
1511
1511
|
<property name="title">
|
1512
1512
|
<string>Window</string>
|
1513
1513
|
</property>
|
1514
|
-
<addaction name="actionLog_Window"/>
|
1515
1514
|
<addaction name="actionBandmap"/>
|
1516
1515
|
<addaction name="actionCheck_Window"/>
|
1516
|
+
<addaction name="actionLog_Window"/>
|
1517
1517
|
<addaction name="actionRate_Window"/>
|
1518
|
+
<addaction name="actionStatistics"/>
|
1518
1519
|
<addaction name="actionVFO"/>
|
1519
1520
|
</widget>
|
1520
1521
|
<widget class="QMenu" name="menuOther">
|
@@ -1780,7 +1781,7 @@
|
|
1780
1781
|
<property name="shortcutVisibleInContextMenu">
|
1781
1782
|
<bool>false</bool>
|
1782
1783
|
</property>
|
1783
|
-
</action>
|
1784
|
+
</action>
|
1784
1785
|
<action name="actionGenerate_EDI">
|
1785
1786
|
<property name="text">
|
1786
1787
|
<string>Generate EDI</string>
|
@@ -2057,6 +2058,22 @@
|
|
2057
2058
|
<string>Command Buttons</string>
|
2058
2059
|
</property>
|
2059
2060
|
</action>
|
2061
|
+
<action name="actionStatistics">
|
2062
|
+
<property name="checkable">
|
2063
|
+
<bool>true</bool>
|
2064
|
+
</property>
|
2065
|
+
<property name="text">
|
2066
|
+
<string>Statistics</string>
|
2067
|
+
</property>
|
2068
|
+
<property name="font">
|
2069
|
+
<font>
|
2070
|
+
<family>JetBrains Mono ExtraLight</family>
|
2071
|
+
</font>
|
2072
|
+
</property>
|
2073
|
+
<property name="shortcut">
|
2074
|
+
<string>Alt+S</string>
|
2075
|
+
</property>
|
2076
|
+
</action>
|
2060
2077
|
</widget>
|
2061
2078
|
<resources/>
|
2062
2079
|
<connections/>
|
not1mm/data/new_contest.ui
CHANGED
@@ -0,0 +1,47 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<ui version="4.0">
|
3
|
+
<class>DockWidget</class>
|
4
|
+
<widget class="QDockWidget" name="DockWidget">
|
5
|
+
<property name="geometry">
|
6
|
+
<rect>
|
7
|
+
<x>0</x>
|
8
|
+
<y>0</y>
|
9
|
+
<width>294</width>
|
10
|
+
<height>192</height>
|
11
|
+
</rect>
|
12
|
+
</property>
|
13
|
+
<property name="windowTitle">
|
14
|
+
<string>Stats</string>
|
15
|
+
</property>
|
16
|
+
<widget class="QWidget" name="dockWidgetContents">
|
17
|
+
<layout class="QGridLayout" name="gridLayout">
|
18
|
+
<item row="1" column="2">
|
19
|
+
<widget class="QTableWidget" name="tableWidget">
|
20
|
+
<column>
|
21
|
+
<property name="text">
|
22
|
+
<string>Band</string>
|
23
|
+
</property>
|
24
|
+
</column>
|
25
|
+
<column>
|
26
|
+
<property name="text">
|
27
|
+
<string>QSO's</string>
|
28
|
+
</property>
|
29
|
+
</column>
|
30
|
+
<column>
|
31
|
+
<property name="text">
|
32
|
+
<string>Calls</string>
|
33
|
+
</property>
|
34
|
+
</column>
|
35
|
+
<column>
|
36
|
+
<property name="text">
|
37
|
+
<string>Points</string>
|
38
|
+
</property>
|
39
|
+
</column>
|
40
|
+
</widget>
|
41
|
+
</item>
|
42
|
+
</layout>
|
43
|
+
</widget>
|
44
|
+
</widget>
|
45
|
+
<resources/>
|
46
|
+
<connections/>
|
47
|
+
</ui>
|
not1mm/lib/version.py
CHANGED
not1mm/plugins/darc_vhf.py
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
# Classes: Single Op, Multi OP, Trainee
|
13
13
|
# Max power: 100 watts
|
14
14
|
# Exchange: RST + Locator
|
15
|
-
# Work stations: Once per band
|
15
|
+
# Work stations: Once per band
|
16
16
|
# Points: 1 point per km distance between stations
|
17
17
|
# Multipliers: no multis
|
18
18
|
# Score Calculation: Total score = sum of all points
|
@@ -49,11 +49,11 @@ columns = [
|
|
49
49
|
"SentNr",
|
50
50
|
"RcvNr",
|
51
51
|
"Exchange1",
|
52
|
-
"PTS"
|
52
|
+
"PTS",
|
53
53
|
]
|
54
54
|
cabrillo_name = "DARC VHF"
|
55
55
|
|
56
|
-
advance_on_space = [True, True, True,True, False]
|
56
|
+
advance_on_space = [True, True, True, True, False]
|
57
57
|
call_parse_exchange_on_edit = True
|
58
58
|
|
59
59
|
# 1 once per contest, 2 work each band, 3 each band/mode, 4 no dupe checking
|
@@ -86,6 +86,7 @@ def reset_label(self):
|
|
86
86
|
"""reset label after field cleared"""
|
87
87
|
self.exch_label.setText("# Grid")
|
88
88
|
|
89
|
+
|
89
90
|
def set_tab_next(self):
|
90
91
|
"""Set TAB Advances"""
|
91
92
|
self.tab_next = {
|
@@ -106,20 +107,20 @@ def set_tab_prev(self):
|
|
106
107
|
self.other_1: self.receive,
|
107
108
|
self.other_2: self.other_1,
|
108
109
|
}
|
109
|
-
|
110
|
+
|
110
111
|
|
111
112
|
def set_contact_vars(self):
|
112
|
-
"""Contest Specific"""
|
113
|
+
"""Contest Specific"""
|
113
114
|
sn, grid = parse_exchange(self)
|
114
115
|
self.contact["SNT"] = self.sent.text()
|
115
116
|
self.contact["RCV"] = self.receive.text()
|
116
|
-
self.contact["SentNr"] = self.other_1.text()
|
117
|
-
self.contact["NR"]= sn
|
118
|
-
self.contact["Exchange1"] =grid
|
119
|
-
|
120
|
-
|
117
|
+
self.contact["SentNr"] = self.other_1.text()
|
118
|
+
self.contact["NR"] = sn
|
119
|
+
self.contact["Exchange1"] = grid
|
120
|
+
|
121
|
+
|
121
122
|
def parse_exchange(self):
|
122
|
-
"""Parse exchange..."""
|
123
|
+
"""Parse exchange..."""
|
123
124
|
exchange = self.other_2.text()
|
124
125
|
exchange = exchange.upper()
|
125
126
|
sn = ""
|
@@ -160,9 +161,9 @@ def points(self):
|
|
160
161
|
"""Calc point"""
|
161
162
|
_points = 1
|
162
163
|
_kilometers = 0
|
163
|
-
_their_grid = self.contact["Exchange1"]
|
164
|
+
_their_grid = self.contact["Exchange1"].upper()
|
164
165
|
_kilometers = distance(self.station.get("GridSquare", ""), _their_grid)
|
165
|
-
_points =
|
166
|
+
_points = max(1, _kilometers)
|
166
167
|
return _points
|
167
168
|
|
168
169
|
|
@@ -170,7 +171,6 @@ def show_mults(self, rtc=None):
|
|
170
171
|
"""Return display string for mults"""
|
171
172
|
|
172
173
|
|
173
|
-
|
174
174
|
def show_qso(self):
|
175
175
|
"""Return qso count"""
|
176
176
|
result = self.database.fetch_qso_count()
|
@@ -187,7 +187,7 @@ def calc_score(self):
|
|
187
187
|
if score is None:
|
188
188
|
score = "0"
|
189
189
|
contest_points = int(score)
|
190
|
-
return contest_points
|
190
|
+
return contest_points
|
191
191
|
return 0
|
192
192
|
|
193
193
|
|
@@ -197,8 +197,8 @@ def adif(self):
|
|
197
197
|
|
198
198
|
|
199
199
|
def edi(self):
|
200
|
-
"""
|
201
|
-
file_encoding="ascii"
|
200
|
+
"""Generate an edi file"""
|
201
|
+
file_encoding = "ascii"
|
202
202
|
logger.debug("******EDI*****")
|
203
203
|
logger.debug("Station: %s", f"{self.station}")
|
204
204
|
logger.debug("Contest: %s", f"{self.contest_settings}")
|
@@ -212,7 +212,7 @@ def edi(self):
|
|
212
212
|
logger.debug("%s", filename)
|
213
213
|
log = self.database.fetch_all_contacts_asc()
|
214
214
|
try:
|
215
|
-
with open(filename, "w", encoding=file_encoding) as file_descriptor:
|
215
|
+
with open(filename, "w", encoding=file_encoding, newline="") as file_descriptor:
|
216
216
|
output_cabrillo_line(
|
217
217
|
"[REG1TEST;1]",
|
218
218
|
"\r\n",
|
@@ -229,7 +229,7 @@ def edi(self):
|
|
229
229
|
loggedyear = value[0:4]
|
230
230
|
loggedmonth = value[5:7]
|
231
231
|
loggedday = value[8:10]
|
232
|
-
loggeddate = loggedyear + loggedmonth +loggedday
|
232
|
+
loggeddate = loggedyear + loggedmonth + loggedday
|
233
233
|
output_cabrillo_line(
|
234
234
|
f"TDate: {loggeddate}",
|
235
235
|
"\r\n",
|
@@ -271,8 +271,8 @@ def edi(self):
|
|
271
271
|
"\r\n",
|
272
272
|
file_descriptor,
|
273
273
|
file_encoding,
|
274
|
-
)
|
275
|
-
BandInMHz = bandinMHz(self.contest_settings.get(
|
274
|
+
)
|
275
|
+
BandInMHz = bandinMHz(self.contest_settings.get("BandCategory", ""))
|
276
276
|
output_cabrillo_line(
|
277
277
|
f"PBand:{BandInMHz}",
|
278
278
|
"\r\n",
|
@@ -320,7 +320,7 @@ def edi(self):
|
|
320
320
|
"\r\n",
|
321
321
|
file_descriptor,
|
322
322
|
file_encoding,
|
323
|
-
)
|
323
|
+
)
|
324
324
|
output_cabrillo_line(
|
325
325
|
f"RCoun:{self.station.get('Country', '')} ",
|
326
326
|
"\r\n",
|
@@ -350,7 +350,7 @@ def edi(self):
|
|
350
350
|
"\r\n",
|
351
351
|
file_descriptor,
|
352
352
|
file_encoding,
|
353
|
-
)
|
353
|
+
)
|
354
354
|
output_cabrillo_line(
|
355
355
|
f"STXEq:{self.station.get('stationtxrx', '')}",
|
356
356
|
"\r\n",
|
@@ -387,7 +387,7 @@ def edi(self):
|
|
387
387
|
"\r\n",
|
388
388
|
file_descriptor,
|
389
389
|
file_encoding,
|
390
|
-
)
|
390
|
+
)
|
391
391
|
output_cabrillo_line(
|
392
392
|
f"CQSOP:{calc_score(self)}",
|
393
393
|
"\r\n",
|
@@ -447,7 +447,7 @@ def edi(self):
|
|
447
447
|
"\r\n",
|
448
448
|
file_descriptor,
|
449
449
|
file_encoding,
|
450
|
-
)
|
450
|
+
)
|
451
451
|
output_cabrillo_line(
|
452
452
|
f"[QSORecords;{NumberOfQsos}]",
|
453
453
|
"\r\n",
|
@@ -457,25 +457,25 @@ def edi(self):
|
|
457
457
|
for contact in log:
|
458
458
|
the_date_and_time = contact.get("TS", "")
|
459
459
|
themode = contact.get("Mode", "")
|
460
|
-
modeCode=0
|
461
|
-
if themode == "LSB" or themode == "USB" or themode=="SSB":
|
460
|
+
modeCode = 0
|
461
|
+
if themode == "LSB" or themode == "USB" or themode == "SSB":
|
462
462
|
modeCode = 1
|
463
|
-
if themode == "CW" or themode == "CWL" or themode=="CWU":
|
463
|
+
if themode == "CW" or themode == "CWL" or themode == "CWU":
|
464
464
|
modeCode = 2
|
465
|
-
frequency = str(int(contact.get("Freq", "0"))).rjust(5)
|
465
|
+
frequency = str(int(contact.get("Freq", "0"))).rjust(5)
|
466
466
|
loggedyear = the_date_and_time[2:4]
|
467
467
|
loggedmonth = the_date_and_time[5:7]
|
468
468
|
loggedday = the_date_and_time[8:10]
|
469
|
-
loggeddate = loggedyear + loggedmonth +loggedday
|
469
|
+
loggeddate = loggedyear + loggedmonth + loggedday
|
470
470
|
loggedtime = the_date_and_time[11:13] + the_date_and_time[14:16]
|
471
|
-
NumberSend = contact.get(
|
472
|
-
NumberReceived = contact.get(
|
471
|
+
NumberSend = contact.get("SentNr", "")
|
472
|
+
NumberReceived = contact.get("NR", "")
|
473
473
|
output_cabrillo_line(
|
474
474
|
f"{loggeddate};"
|
475
475
|
f"{loggedtime};"
|
476
476
|
f"{contact.get('Call', '')};"
|
477
477
|
f"{modeCode};"
|
478
|
-
f"{str(contact.get('SNT', ''))};"
|
478
|
+
f"{str(contact.get('SNT', ''))};"
|
479
479
|
f"{NumberSend:03d};"
|
480
480
|
f"{str(contact.get('RCV', ''))};"
|
481
481
|
f"{NumberReceived:03d};"
|
@@ -495,14 +495,14 @@ def edi(self):
|
|
495
495
|
|
496
496
|
|
497
497
|
def bandinMHz(band):
|
498
|
-
switch={
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
return switch.get(band,"Invalid input {band}")
|
498
|
+
switch = {
|
499
|
+
"6M": "50 MHz",
|
500
|
+
"4M": "70 MHz",
|
501
|
+
"2M": "144 MHz",
|
502
|
+
"70cm": "432 MHz",
|
503
|
+
"23cm": "1,3 GHz",
|
504
|
+
}
|
505
|
+
return switch.get(band, "Invalid input {band}")
|
506
506
|
|
507
507
|
|
508
508
|
def output_cabrillo_line(line_to_output, ending, file_descriptor, file_encoding):
|
@@ -530,7 +530,7 @@ def cabrillo(self, file_encoding):
|
|
530
530
|
logger.debug("%s", filename)
|
531
531
|
log = self.database.fetch_all_contacts_asc()
|
532
532
|
try:
|
533
|
-
with open(filename, "w", encoding=file_encoding) as file_descriptor:
|
533
|
+
with open(filename, "w", encoding=file_encoding, newline="") as file_descriptor:
|
534
534
|
output_cabrillo_line(
|
535
535
|
"START-OF-LOG: 3.0",
|
536
536
|
"\r\n",
|
@@ -714,9 +714,9 @@ def recalculate_mults(self):
|
|
714
714
|
all_contacts = self.database.fetch_all_contacts_asc()
|
715
715
|
for contact in all_contacts:
|
716
716
|
# recalculate points
|
717
|
-
_their_grid = contact.get("Exchange1")
|
717
|
+
_their_grid = contact.get("Exchange1").upper()
|
718
718
|
_kilometers = distance(self.station.get("GridSquare", ""), _their_grid)
|
719
|
-
_points =
|
719
|
+
_points = max(1, _kilometers)
|
720
720
|
contact["Points"] = _points
|
721
721
|
|
722
722
|
self.database.change_contact(contact)
|
not1mm/plugins/ea_majistad_cw.py
CHANGED
@@ -582,7 +582,7 @@ def populate_history_info_line(self):
|
|
582
582
|
result = self.database.fetch_call_history(self.callsign.text())
|
583
583
|
if result:
|
584
584
|
self.history_info.setText(
|
585
|
-
f"{result.get('Call', '')}, {result.get('Name', '')}, {result.get('
|
585
|
+
f"{result.get('Call', '')}, {result.get('Name', '')}, {result.get('Exch1', '')}, {result.get('UserText','...')}"
|
586
586
|
)
|
587
587
|
else:
|
588
588
|
self.history_info.setText("")
|
@@ -594,7 +594,7 @@ def check_call_history(self):
|
|
594
594
|
if result:
|
595
595
|
self.history_info.setText(f"{result.get('UserText','')}")
|
596
596
|
if self.other_2.text() == "":
|
597
|
-
self.other_2.setText(f"{result.get('
|
597
|
+
self.other_2.setText(f"{result.get('Exch1', '')}")
|
598
598
|
|
599
599
|
|
600
600
|
def get_mults(self):
|