[chirp_devel] [PATCH 2 of 5] [ft4] improve serial i/o [#4787]

Dan Clemmensen
Thu Feb 28 07:48:05 PST 2019


I missed it in this patch, so I stuck it in the last patch when I reviewed
your e-mail one last time. I am just
now beginning to understand the mq patch "stack" concept, so I now realize
that I should have popped the
later patches, made this fix in the early patch, and then pushed the later
patches back on the stack. I had not
figured that out.

On Thu, Feb 28, 2019 at 6:48 AM Dan Smith via chirp_devel <
chirp_devel at intrepid.danplanet.com> wrote:

> > +def variable_len_resp(pipe):
> > +    """
> > +    when length of expected reply is not known, read byte at a time
> > +    until the ack character is found.
> > +    """
> > +    response = b""
> > +    i = 0
> > +    toolong = 256        # arbitrary
> > +    while True:
> > +        b = pipe.read(1)
> > +        if b == b'\x06':
> > +            break
> > +        else:
> > +            response += b
> > +            i += 1
> > +            if i > toolong:
> > +                LOG.debug("Response too long. got" +
> util.hexprint(response))
> > +                raise errors.RadioError("Response too long.")
>
> Did you have a response to my comments in this part of the first patch?
>
> --Dan
> _______________________________________________
> chirp_devel mailing list
> chirp_devel at intrepid.danplanet.com
> http://intrepid.danplanet.com/mailman/listinfo/chirp_devel
> Developer docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://intrepid.danplanet.com/pipermail/chirp_devel/attachments/20190228/ff197c18/attachment-0001.html 


More information about the chirp_devel mailing list