[chirp_devel] [PATCH] [FT-70] #5329 Corrects handling of Mycall string – Thanks Fred

Dan Smith
Thu May 3 10:42:54 PDT 2018


> 
> @@ -937,7 +940,16 @@
> 
>     def _get_digital_settings(self):
>         menu = RadioSettingGroup("digital_settings", "Digital")
> -
> +        

You're adding a line with leading whitespace here.

> +        # MYCALL
> +        mycall = self._memobj.my_call
> +        mycallstr = str(mycall.callsign).rstrip("\xFF")

Maybe it would be better to filter this to our known charset, in case there's something else in there besides \xFF? I say this because in my experience, Yaesu radios don't ever really clear memory so if you got something invalid in there somehow, we might never get it out. What about:

 mycallstr = ''.join(x for x in str(mycall.callsign) if x in self._MYCALL_CHR_SET)

?

--Dan


More information about the chirp_devel mailing list