Howard A. Landman <how...@riverrock.org> added the comment:

I'm running under 32-bit Raspbian, so let's assume the magic number is 13. 
There are only two places in my own code where the number 13 appears:

(1) My result_list is 14 items long, i.e. 0 to 13. Relevant code from qtd.py:
cum_results = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
...
while batches != 0:
    ...
    result_list = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
    for m in range(ITERS):
        ...
        result = tdc.measure(...)
        result_list[result] += 1
        ...
    for i in range(len(result_list)):
        cum_results[i] += result_list[i]

I notice that result_list is getting thrown away each cycle, and thus must be 
garbage-collected. I could try changing that and see if it has any effect.

(2) in the tdc7201 library, 13 occurs as a possible (error) result code from 
measure(). However several of the failing runs had zero errors of this class, 
which means the code with 13 in it never got executed even once. I am not using 
pin 13 of the RPi's header, so I never send that number to RPi.GPIO. GPIO13 is 
pin 33 of the header, and I am not using that pin either, so I don't think 
RPi.GPIO is translating one of my pin number arguments to 13 internally. (But I 
should check Broadcom Mode numbers.)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41335>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to