This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Howard_Landman
Recipients Howard_Landman
Date 2020-07-27.20:39:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1595882392.5.0.176230291157.issue41335@roundup.psfhosted.org>
In-reply-to
Content
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.)
History
Date User Action Args
2020-07-27 20:39:52Howard_Landmansetrecipients: + Howard_Landman
2020-07-27 20:39:52Howard_Landmansetmessageid: <1595882392.5.0.176230291157.issue41335@roundup.psfhosted.org>
2020-07-27 20:39:52Howard_Landmanlinkissue41335 messages
2020-07-27 20:39:51Howard_Landmancreate