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

Dan Smith
Fri May 11 07:55:13 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.

I fixed this and one other instance I found and pushed this to the repo.

>> +        # 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)

I still think this is probably worthwhile.

--Dan


More information about the chirp_devel mailing list