hx711py
hx711py copied to clipboard
fix high cpu load problem + apply flake8 rules + fix is syntax
1 - using pass
in while
when checking for ready on line 115 causes high CPU load, something around 100% CPU use, a small sleep
will release CPU clocks for good use.
2 - use of is
for comparing two number in python is wrong and ==
should be replaced.
3 - flake8
rules applied to make python code more readable and clean
Hi! Thanks for the PR. I'll check it out by the end of the week. I'll also submit a whole new version based on interrupts instead of a loop that waits, in order to avoid freezing the CPU while waiting for the data line to go LOW, so I'll pull this into the new version as well.
Hi, sounds amazing, we are waiting. 🤘
On Mon, 13 Dec 2021, 21:49 Tato Barilatti, @.***> wrote:
Hi! Thanks for the PR. I'll check it out by the end of the week. I'll also submit a whole new version based on interrupts instead of a loop that waits, in order to avoid freezing the CPU while waiting for the data line to go LOW.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tatobari/hx711py/pull/46#issuecomment-992745068, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK466X4ABAMTDEQ524CXTYTUQY2L5ANCNFSM5JL3OOJQ .
Still waiting on this
Hi, I am here again after about 3 years, do you have any plans about this pull request? or should I close this PR?