Closed Clotoo closed 7 years ago
This was fixed in #3 but not published to npm yet. @dangrie158 please publish it :)
Hi, I just bumped the minor version since the API changed. New release (and npm published version) is 0.3.0.
https://github.com/dangrie158/opencushion/commit/5c287e3c15a45425277804ecd7a919207d7a755a
Great, thank you!
It seems that wiringPiSetup cannot be called multiple times per program anymore. It crashes the program with the following message :
wiringPiSetup*: You must only call this once per program run. This is a fatal error. Please fix your code.
It happens consistently in either case :
The hx711 cpp constructor seems to call wiringPiSetup every time. The johnny-five module also calls wiringPiSetup upon loading.
My suggestion for a simple fix is to add an optional boolean parameter in the hx711 constructor, to let the user decide if wiringPiSetup should be called or not. Will submit a pull request soon.