[chirp_devel] [h777] Enable sidekey configuration for Radioddity GA-2S

Tony Fuller
Thu Aug 15 18:50:13 PDT 2019


Hi All,

This is my first patch submission for CHIRP. :)

I am open to suggestions on the global variable hack. If more of these
variables were inside a class then it would be trivial to update it in
the __init__() method using self.SIDEKEYFUNCTION_LIST

I tried to minimize the amount of code I touched.
This patch works with both of my Radioddity GA-2S units (ordered as a
pair). Changing the sidekey to "TX Power" (as defined by Baofeng 888)
seemed to disable the sidekey.

Thanks,
Tony


# HG changeset patch
# User Tony F <goldstar611 at hotmail.com>
# Date 1565919586 18000
#      Thu Aug 15 20:39:46 2019 -0500
# Node ID a4de835cd49d431e81c906b62aac28fd87f4a268
# Parent  42b4bb639fb6892826091a8a86bf9347b116fe51
[h777] Enable sidekey configuration for Radioddity GA-2S
Issue #6217 https://chirp.danplanet.com/issues/6217
NOTE: TX Power cannot be adjusted using the sidekey

diff --git a/chirp/drivers/h777.py b/chirp/drivers/h777.py
--- a/chirp/drivers/h777.py
+++ b/chirp/drivers/h777.py
@@ -618,9 +618,13 @@
     VENDOR = "Radioddity"
     MODEL = "GA-2S"
     _has_fm = False
-    _has_sidekey = False
 
     @classmethod
     def match_model(cls, filedata, filename):
         # This model is only ever matched via metadata
         return False
+
+    def get_settings(self):
+        globals()["SIDEKEYFUNCTION_LIST"] = ["Off", "Monitor",
"Unused", "Alarm"]
+        return super(ROGA2SRadio, self).get_settings()
+



More information about the chirp_devel mailing list