[chirp_devel] [PATCH] Fix logic error preventing auto repeater setting in some cases

Dan Smith
Tue Mar 12 20:33:16 PDT 2013


> If you drop self._config.get_bool("autorpt"), this reads:

I'm not sure why dropping it has any relevance, but perhaps you're just
saying it reads oddly?

> +        is_changed = new != prev if was_filled else True
> +        if new and is_changed:

How about we change it to:

  is_changed = new != prev if was_filled else True
  autorpt_enabled = self._config.get_bool("autorpt")

  if new is not None and is_changed and autorpt_enabled:
      ....

?

In reality, that's why new is in the comparison (since it could be set
to None right above in the parse_freq() bit). Perhaps the more explicit
"is not None" reads better?

-- 
Dan Smith
www.danplanet.com
KK7DS
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
Url : http://intrepid.danplanet.com/pipermail/chirp_devel/attachments/20130312/b9e58ba3/attachment-0001.bin 


More information about the chirp_devel mailing list