hx711py icon indicating copy to clipboard operation
hx711py copied to clipboard

fix high cpu load problem + apply flake8 rules + fix is syntax

Open devprofile98 opened this issue 3 years ago • 4 comments

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

devprofile98 avatar Dec 04 '21 18:12 devprofile98

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.

tatobari avatar Dec 13 '21 18:12 tatobari

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 .

devprofile98 avatar Dec 13 '21 18:12 devprofile98

Still waiting on this

AddisonG avatar Nov 15 '22 23:11 AddisonG

Hi, I am here again after about 3 years, do you have any plans about this pull request? or should I close this PR?

devprofile98 avatar Jun 30 '24 06:06 devprofile98