-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add streaming support for hx711 device #2793
Conversation
Conflicts: app/modules/hx711.c
Ideally we could get the original author @christakahashi to review this but that's probably unlikely to happen. |
I'm no longer equipped to test this code. I can read it over to check that it appears to work right for the HX711 hardware. If that's helpful let me know. |
Sure, any type of review is certainly welcome. |
Argh, this failed CI. @pjsg would you mind taking a look?
Source: https://travis-ci.org/nodemcu/nodemcu-firmware/jobs/583107655#L1187 P.S. I have no idea why CI wasn't triggered when you initially submitted the PR. |
@marcelstoer @pjsg what happened to the discussion and agreement to hold off committing other PRs post master drop, so that I could do the Lua 5.1 to Lua 5.3 realignment without having to work through other PRs being committed in parallel? This has been a long hard task for me. What is absolutely essential here is that we can build the firmware and in particular the modules and their supporting libraries against both Lua 5.1 and 5.3 and to do this I've had to remove use of undocumented extensions and some eLua crap such as needing to check explicitly for lightweight function types. I've had to rework all of the modules to get them to conform to the Lua API. And of course applying all of the NodeMCU changes to the Lua 5.3 distro. In terms of this commit, the least effort for all is now to let the commit stand. Once we've reviewed reviewed these API changes and we are happy with these (so modules changes can be considered stable) then we can start to schedule releasing PRs relating to other module changes. All I am asking is that the other committers honour this short moratorium. This is a request, but if other committers continue commit across this during this few week period, then it makes it almost impossible to continue with this work. So if you do want to carry on committing then please let me know, and I will regretfully abandon the whole Lua 5.3 upgrade program. |
I am sorry, I didn't remember. I didn't intentionally step on your toes.
That's where I disagree. I think I should just revert it to bring |
Marcel, do whatever works best. This is a one off that I can cope with. 😊 |
This reverts commit 32ad759.
Yes -- I'll fix it up tomorrow. My guess is that some header inclusion stuff changed since I submitted it. It builds fine on my local system (or it did a few months ago) |
Fixes #2733 .
dev
branch rather than formaster
.docs/*
.The current hx711 is deficient in a couple of ways. It only allows reading from channel A with a fixed gain, and it only supports single reads. This PR fixes both of these problems by allowing the full choice of inputs and gains, and also adds a streaming callback interface that returns multiple samples in a buffer. The sample rate is either 10Hz or 80Hz -- and this depends on how the hardware is configured (i.e. it isn't software controllable).