[chirp_devel] run_all_tests.bat stalls

Marco Filippi IZ3GME
Wed Oct 14 08:19:03 PDT 2015


Hey Jim
I would initialize ack to empty string and add a counter to the while to 
giveup if the expected ack is not received after (say) 10 cicles.

my two cents
73 de IZ3GME Marco

On 14/10/2015 01:31, Jim Unroe via chirp_devel wrote:
> The following was submitted as a fix for the Baofeng UV-B5 radios with
> 27 menus that won't work with CHIRP. It was a uvb5.py that I turned
> into a patch (attached).
>
> It apparently works as indicated and it also works on my UV-B5 with 29
> menus. However when I perform the "run_all_tests" it stalls when it
> gets to the UV-B5 area. I believe it is getting in a loop.
>
> Any ideas on how to resolve this?
>
> Thanks,
> Jim
>
> diff -r 853c2aa66578 -r cc1769b2cdb3 chirp/drivers/uvb5.py
> --- a/chirp/drivers/uvb5.py    Sun Oct 11 10:50:10 2015 +0300
> +++ b/chirp/drivers/uvb5.py    Tue Oct 13 19:25:00 2015 -0400
> @@ -175,10 +175,14 @@
>
>   def do_ident(radio):
>       radio.pipe.setTimeout(3)
> -    radio.pipe.write("PROGRAM")
> -    ack = radio.pipe.read(1)
> -    if ack != '\x06':
> -        raise errors.RadioError("Radio did not ack programming mode")
> +    ack = '\x00'
> +    radio.pipe.write("\x05PROGRAM")
> +    while ack != '\x06':
> +        ack = radio.pipe.read(1)
> +        if len(ack) == 0:
> +            # We timed out without seeing the expected byte
> +            raise errors.RadioError("Radio did not ack programming mode")
> +            return
>       radio.pipe.write("\x02")
>       ident = radio.pipe.read(8)
>       LOG.debug(util.hexprint(ident))
>
>
>
> _______________________________________________
> 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
>




More information about the chirp_devel mailing list