[chirp_devel] [PATCH] Fix logic error preventing auto repeater setting in some cases
Sean Burford
Wed Mar 13 19:34:41 PDT 2013
Hi,
On Wed, Mar 13, 2013 at 2:33 PM, Dan Smith <dsmith at danplanet.com> wrote:
> > 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?
>
Sorry, yes, I meant that "new and changed" 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:
> ....
>
That looks good. Understanding that new is actually new_value makes the
whole argument moot.
--
Sean Burford <sburford at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://intrepid.danplanet.com/pipermail/chirp_devel/attachments/20130314/bf015cfe/attachment-0001.html
More information about the chirp_devel
mailing list