[chirp_devel] [h777] Enable sidekey configuration for Radioddity GA-2S
Dan Smith
Fri Aug 16 15:42:48 PDT 2019
> @@ -288,6 +287,10 @@
> _has_fm = True
> _has_sidekey = True
>
> + def __init__(self, *args, **kwargs):
> + super(H777Radio, self).__init__(*args, **kwargs)
> + self.SIDEKEYFUNCTION_LIST = ["Off", "Monitor", "Transmit
> Power", "Alarm"]
> +
You don't need to do this. Just put SIDEKEYFUNCTION_LIST in the class definition (like _has_sidekey) and use it as self.SIDEKEYFUNCTION_LIST as you do below. Then in the GA-2S class definition, just define it there as well and it will win over the parent's definition as appropriate. Should be two new lines, and the one changed one to use the instance-local version. What you have here is better than the global of course, but if anyone subclasses it and doesn't run super(), then they'd break.
I have some clones of this radio and can test when I go to apply the final one.
--Dan
More information about the chirp_devel
mailing list