diff --git a/README.md b/README.md index 86a1c62..2e13e1c 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ - [Data and RTTY](#data-and-rtty) - [Other not so supported contests](#other-not-so-supported-contests) - [Our Code Contributors ✨](#our-code-contributors-) - - [List of should be working contests, those in bold have ESM](#list-of-should-be-working-contests-those-in-bold-have-esm) + - [List of should be working contests](#list-of-should-be-working-contests) - [Recent Changes (Polishing the Turd)](#recent-changes-polishing-the-turd) - [Flatpak](#flatpak) - [Installation](#installation) @@ -172,38 +172,38 @@ generated, 'cause I'm lazy, list of those who've submitted PR's. Avatar icons for code contributors. -## List of should be working contests, those in bold have ESM +## List of should be working contests -- **General Logging** (There are better general loggers like QLog, KLog, CQRLog) +- General Logging (There are better general loggers like QLog, KLog, CQRLog) - 10 10 Fall CW - 10 10 Spring CW - 10 10 Summer Phone - 10 10 Winter Phone -- **ARRL 10M** -- **ARRL DX CW, SSB** -- **ARRL Field Day** -- **ARRL Sweepstakes CW, SSB** -- **ARRL VHF January, June, September** -- **CQ 160 CW, SSB** -- **CQ WPX CW, RTTY, SSB** -- **CQ World Wide CW, RTTY, SSB** -- **CWOps CWT** -- **DARC Xmas** -- **Helvetia** -- **IARU Fieldday R1 CW, SSB** -- **IARU HF** -- **ICWC MST** -- **Japan International DX CW, SSB** -- **K1USN Slow Speed Test** -- **LZ DX** -- **NAQP CW, RTTY, SSB** -- **Phone Weekly Test** -- **RAEM** -- **RAC Canada Day** -- **REF CW, SSB** -- **Stew Perry Topband** -- **Weekly RTTY** -- **Winter Field Day** +- ARRL 10M +- ARRL DX CW, SSB +- ARRL Field Day +- ARRL Sweepstakes CW, SSB +- ARRL VHF January, June, September +- CQ 160 CW, SSB +- CQ WPX CW, RTTY, SSB +- CQ World Wide CW, RTTY, SSB +- CWOps CWT +- DARC Xmas +- Helvetia +- IARU Fieldday R1 CW, SSB +- IARU HF +- ICWC MST +- Japan International DX CW, SSB +- K1USN Slow Speed Test +- LZ DX +- NAQP CW, RTTY, SSB +- Phone Weekly Test +- RAEM +- RAC Canada Day +- REF CW, SSB +- Stew Perry Topband +- Weekly RTTY +- Winter Field Day ## Recent Changes (Polishing the Turd) diff --git a/not1mm/plugins/10_10_fall_cw.py b/not1mm/plugins/10_10_fall_cw.py index 1f2d806..26ee79c 100644 --- a/not1mm/plugins/10_10_fall_cw.py +++ b/not1mm/plugins/10_10_fall_cw.py @@ -359,3 +359,94 @@ def cabrillo(self, file_encoding): def recalculate_mults(self): """Recalculates multipliers after change in logged qso.""" + + +def process_esm(self, new_focused_widget=None, with_enter=False): + """ESM State Machine""" + + # self.pref["run_state"] + + # -----===== Assigned F-Keys =====----- + # self.esm_dict["CQ"] + # self.esm_dict["EXCH"] + # self.esm_dict["QRZ"] + # self.esm_dict["AGN"] + # self.esm_dict["HISCALL"] + # self.esm_dict["MYCALL"] + # self.esm_dict["QSOB4"] + + # ----==== text fields ====---- + # self.callsign + # self.sent + # self.receive + # self.other_1 + # self.other_2 + + if new_focused_widget is not None: + self.current_widget = self.inputs_dict.get(new_focused_widget) + + # print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}") + + for a_button in [ + self.esm_dict["CQ"], + self.esm_dict["EXCH"], + self.esm_dict["QRZ"], + self.esm_dict["AGN"], + self.esm_dict["HISCALL"], + self.esm_dict["MYCALL"], + self.esm_dict["QSOB4"], + ]: + if a_button is not None: + self.restore_button_color(a_button) + + buttons_to_send = [] + + if self.pref.get("run_state"): + if self.current_widget == "callsign": + if len(self.callsign.text()) < 3: + self.make_button_green(self.esm_dict["CQ"]) + buttons_to_send.append(self.esm_dict["CQ"]) + elif len(self.callsign.text()) > 2: + self.make_button_green(self.esm_dict["HISCALL"]) + self.make_button_green(self.esm_dict["EXCH"]) + buttons_to_send.append(self.esm_dict["HISCALL"]) + buttons_to_send.append(self.esm_dict["EXCH"]) + + elif self.current_widget in ["other_2"]: + if self.other_2.text() == "": + self.make_button_green(self.esm_dict["AGN"]) + buttons_to_send.append(self.esm_dict["AGN"]) + else: + self.make_button_green(self.esm_dict["QRZ"]) + buttons_to_send.append(self.esm_dict["QRZ"]) + buttons_to_send.append("LOGIT") + + if with_enter is True and bool(len(buttons_to_send)): + for button in buttons_to_send: + if button: + if button == "LOGIT": + self.save_contact() + continue + self.process_function_key(button) + else: + if self.current_widget == "callsign": + if len(self.callsign.text()) > 2: + self.make_button_green(self.esm_dict["MYCALL"]) + buttons_to_send.append(self.esm_dict["MYCALL"]) + + elif self.current_widget in ["other_2"]: + if self.other_2.text() == "": + self.make_button_green(self.esm_dict["AGN"]) + buttons_to_send.append(self.esm_dict["AGN"]) + else: + self.make_button_green(self.esm_dict["EXCH"]) + buttons_to_send.append(self.esm_dict["EXCH"]) + buttons_to_send.append("LOGIT") + + if with_enter is True and bool(len(buttons_to_send)): + for button in buttons_to_send: + if button: + if button == "LOGIT": + self.save_contact() + continue + self.process_function_key(button) diff --git a/not1mm/plugins/10_10_spring_cw.py b/not1mm/plugins/10_10_spring_cw.py index 2421247..7579eac 100644 --- a/not1mm/plugins/10_10_spring_cw.py +++ b/not1mm/plugins/10_10_spring_cw.py @@ -358,3 +358,94 @@ def cabrillo(self, file_encoding): def recalculate_mults(self): """Recalculates multipliers after change in logged qso.""" + + +def process_esm(self, new_focused_widget=None, with_enter=False): + """ESM State Machine""" + + # self.pref["run_state"] + + # -----===== Assigned F-Keys =====----- + # self.esm_dict["CQ"] + # self.esm_dict["EXCH"] + # self.esm_dict["QRZ"] + # self.esm_dict["AGN"] + # self.esm_dict["HISCALL"] + # self.esm_dict["MYCALL"] + # self.esm_dict["QSOB4"] + + # ----==== text fields ====---- + # self.callsign + # self.sent + # self.receive + # self.other_1 + # self.other_2 + + if new_focused_widget is not None: + self.current_widget = self.inputs_dict.get(new_focused_widget) + + # print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}") + + for a_button in [ + self.esm_dict["CQ"], + self.esm_dict["EXCH"], + self.esm_dict["QRZ"], + self.esm_dict["AGN"], + self.esm_dict["HISCALL"], + self.esm_dict["MYCALL"], + self.esm_dict["QSOB4"], + ]: + if a_button is not None: + self.restore_button_color(a_button) + + buttons_to_send = [] + + if self.pref.get("run_state"): + if self.current_widget == "callsign": + if len(self.callsign.text()) < 3: + self.make_button_green(self.esm_dict["CQ"]) + buttons_to_send.append(self.esm_dict["CQ"]) + elif len(self.callsign.text()) > 2: + self.make_button_green(self.esm_dict["HISCALL"]) + self.make_button_green(self.esm_dict["EXCH"]) + buttons_to_send.append(self.esm_dict["HISCALL"]) + buttons_to_send.append(self.esm_dict["EXCH"]) + + elif self.current_widget in ["other_2"]: + if self.other_2.text() == "": + self.make_button_green(self.esm_dict["AGN"]) + buttons_to_send.append(self.esm_dict["AGN"]) + else: + self.make_button_green(self.esm_dict["QRZ"]) + buttons_to_send.append(self.esm_dict["QRZ"]) + buttons_to_send.append("LOGIT") + + if with_enter is True and bool(len(buttons_to_send)): + for button in buttons_to_send: + if button: + if button == "LOGIT": + self.save_contact() + continue + self.process_function_key(button) + else: + if self.current_widget == "callsign": + if len(self.callsign.text()) > 2: + self.make_button_green(self.esm_dict["MYCALL"]) + buttons_to_send.append(self.esm_dict["MYCALL"]) + + elif self.current_widget in ["other_2"]: + if self.other_2.text() == "": + self.make_button_green(self.esm_dict["AGN"]) + buttons_to_send.append(self.esm_dict["AGN"]) + else: + self.make_button_green(self.esm_dict["EXCH"]) + buttons_to_send.append(self.esm_dict["EXCH"]) + buttons_to_send.append("LOGIT") + + if with_enter is True and bool(len(buttons_to_send)): + for button in buttons_to_send: + if button: + if button == "LOGIT": + self.save_contact() + continue + self.process_function_key(button) diff --git a/not1mm/plugins/10_10_summer_phone.py b/not1mm/plugins/10_10_summer_phone.py index 36805f2..17c7425 100644 --- a/not1mm/plugins/10_10_summer_phone.py +++ b/not1mm/plugins/10_10_summer_phone.py @@ -362,3 +362,94 @@ def cabrillo(self, file_encoding): def recalculate_mults(self): """Recalculates multipliers after change in logged qso.""" + + +def process_esm(self, new_focused_widget=None, with_enter=False): + """ESM State Machine""" + + # self.pref["run_state"] + + # -----===== Assigned F-Keys =====----- + # self.esm_dict["CQ"] + # self.esm_dict["EXCH"] + # self.esm_dict["QRZ"] + # self.esm_dict["AGN"] + # self.esm_dict["HISCALL"] + # self.esm_dict["MYCALL"] + # self.esm_dict["QSOB4"] + + # ----==== text fields ====---- + # self.callsign + # self.sent + # self.receive + # self.other_1 + # self.other_2 + + if new_focused_widget is not None: + self.current_widget = self.inputs_dict.get(new_focused_widget) + + # print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}") + + for a_button in [ + self.esm_dict["CQ"], + self.esm_dict["EXCH"], + self.esm_dict["QRZ"], + self.esm_dict["AGN"], + self.esm_dict["HISCALL"], + self.esm_dict["MYCALL"], + self.esm_dict["QSOB4"], + ]: + if a_button is not None: + self.restore_button_color(a_button) + + buttons_to_send = [] + + if self.pref.get("run_state"): + if self.current_widget == "callsign": + if len(self.callsign.text()) < 3: + self.make_button_green(self.esm_dict["CQ"]) + buttons_to_send.append(self.esm_dict["CQ"]) + elif len(self.callsign.text()) > 2: + self.make_button_green(self.esm_dict["HISCALL"]) + self.make_button_green(self.esm_dict["EXCH"]) + buttons_to_send.append(self.esm_dict["HISCALL"]) + buttons_to_send.append(self.esm_dict["EXCH"]) + + elif self.current_widget in ["other_2"]: + if self.other_2.text() == "": + self.make_button_green(self.esm_dict["AGN"]) + buttons_to_send.append(self.esm_dict["AGN"]) + else: + self.make_button_green(self.esm_dict["QRZ"]) + buttons_to_send.append(self.esm_dict["QRZ"]) + buttons_to_send.append("LOGIT") + + if with_enter is True and bool(len(buttons_to_send)): + for button in buttons_to_send: + if button: + if button == "LOGIT": + self.save_contact() + continue + self.process_function_key(button) + else: + if self.current_widget == "callsign": + if len(self.callsign.text()) > 2: + self.make_button_green(self.esm_dict["MYCALL"]) + buttons_to_send.append(self.esm_dict["MYCALL"]) + + elif self.current_widget in ["other_2"]: + if self.other_2.text() == "": + self.make_button_green(self.esm_dict["AGN"]) + buttons_to_send.append(self.esm_dict["AGN"]) + else: + self.make_button_green(self.esm_dict["EXCH"]) + buttons_to_send.append(self.esm_dict["EXCH"]) + buttons_to_send.append("LOGIT") + + if with_enter is True and bool(len(buttons_to_send)): + for button in buttons_to_send: + if button: + if button == "LOGIT": + self.save_contact() + continue + self.process_function_key(button) diff --git a/not1mm/plugins/10_10_winter_phone.py b/not1mm/plugins/10_10_winter_phone.py index 8495f5b..c3813dc 100644 --- a/not1mm/plugins/10_10_winter_phone.py +++ b/not1mm/plugins/10_10_winter_phone.py @@ -360,3 +360,94 @@ def cabrillo(self, file_encoding): def recalculate_mults(self): """Recalculates multipliers after change in logged qso.""" + + +def process_esm(self, new_focused_widget=None, with_enter=False): + """ESM State Machine""" + + # self.pref["run_state"] + + # -----===== Assigned F-Keys =====----- + # self.esm_dict["CQ"] + # self.esm_dict["EXCH"] + # self.esm_dict["QRZ"] + # self.esm_dict["AGN"] + # self.esm_dict["HISCALL"] + # self.esm_dict["MYCALL"] + # self.esm_dict["QSOB4"] + + # ----==== text fields ====---- + # self.callsign + # self.sent + # self.receive + # self.other_1 + # self.other_2 + + if new_focused_widget is not None: + self.current_widget = self.inputs_dict.get(new_focused_widget) + + # print(f"checking esm {self.current_widget=} {with_enter=} {self.pref.get("run_state")=}") + + for a_button in [ + self.esm_dict["CQ"], + self.esm_dict["EXCH"], + self.esm_dict["QRZ"], + self.esm_dict["AGN"], + self.esm_dict["HISCALL"], + self.esm_dict["MYCALL"], + self.esm_dict["QSOB4"], + ]: + if a_button is not None: + self.restore_button_color(a_button) + + buttons_to_send = [] + + if self.pref.get("run_state"): + if self.current_widget == "callsign": + if len(self.callsign.text()) < 3: + self.make_button_green(self.esm_dict["CQ"]) + buttons_to_send.append(self.esm_dict["CQ"]) + elif len(self.callsign.text()) > 2: + self.make_button_green(self.esm_dict["HISCALL"]) + self.make_button_green(self.esm_dict["EXCH"]) + buttons_to_send.append(self.esm_dict["HISCALL"]) + buttons_to_send.append(self.esm_dict["EXCH"]) + + elif self.current_widget in ["other_2"]: + if self.other_2.text() == "": + self.make_button_green(self.esm_dict["AGN"]) + buttons_to_send.append(self.esm_dict["AGN"]) + else: + self.make_button_green(self.esm_dict["QRZ"]) + buttons_to_send.append(self.esm_dict["QRZ"]) + buttons_to_send.append("LOGIT") + + if with_enter is True and bool(len(buttons_to_send)): + for button in buttons_to_send: + if button: + if button == "LOGIT": + self.save_contact() + continue + self.process_function_key(button) + else: + if self.current_widget == "callsign": + if len(self.callsign.text()) > 2: + self.make_button_green(self.esm_dict["MYCALL"]) + buttons_to_send.append(self.esm_dict["MYCALL"]) + + elif self.current_widget in ["other_2"]: + if self.other_2.text() == "": + self.make_button_green(self.esm_dict["AGN"]) + buttons_to_send.append(self.esm_dict["AGN"]) + else: + self.make_button_green(self.esm_dict["EXCH"]) + buttons_to_send.append(self.esm_dict["EXCH"]) + buttons_to_send.append("LOGIT") + + if with_enter is True and bool(len(buttons_to_send)): + for button in buttons_to_send: + if button: + if button == "LOGIT": + self.save_contact() + continue + self.process_function_key(button)