Open lytvynenkosv opened 10 years ago
Hmmm, no it looks like libuv changed already. I knew it some stuff was changing in 0.12 but it's odd that within 0.10.x it's giving you trouble.
I'll take a look to see if it's an easy fix, but note two things:
Thanks for the report, and sorry this is not in a good shape right now. Hopefully more progress soon and happy for any feedback.
Just as a note: I'm doing a project which involves a raspberry pi and a nrf24l01+ and since this library here unfortunately isn't completely in shape yet ;-), I want to implement a "software driver" based on the spi module (and share it on github...). So unless you're really in the mood for it, you can wait for my implementation, it should be usable within a couple of weeks... Best, Benni.
Thanks for the heads up @bennigraf! Is there a good RasPi SPI library for node.js? The only ones I've found do blocking calls, so my plan was to first write a proper SPI binding that attempts to be compatible with another platform's likely JS API. Then this module would be pure JS and depend on that. But it sounds like you may be ahead of me on both.
@natevw Nope, not quite :-). I was going to go with node-spi (https://github.com/RussTheAerialist/node-spi) which is the blocking one, yet the author states that he wants to change that at some point. If you happen to write a better implementation I'll jump on this train, though!
As far as the OP goes, yes for whatever reason libuv added a "status" parameter to the callback, apparently mid-0.10.x — it'd be a fairly easy fix and I may just do it and finish up this branch.
However, I've got a new SPI library working and will likely start a new branch/repo building an nRF driver on top of it soon: https://github.com/natevw/pi-spi
Sorry, forgot to update this thread but pi-spi is working and I've been making progress on https://github.com/natevw/node-nrf built atop. I'm still not ruling out finishing this (or certainly happy to review pull requests that do so) but I'm hoping the other version becomes worth its differences.
Thanks for your work natevw! I wanted to let you guys know that I created a workable driver for the nrf as well, you can find it here: https://github.com/bennigraf/Lammps/tree/master/controller/soft-rf24 (unfortunately hidden inside another repo/project for now until I find out how to deal with submodules...). This isn't the most beautiful code you'll ever see, but I got it to work on the raspberry ;-). I consider switching to your spi library, I just need to wrap my head around the blocking/non-blocking topic and it's sideeffects. Feel free to try it out, use it, improve it or steal from it if you want!
Trying to build on Raspberry Pi but npm build return error:
Nodejs version 10.0.18 npm version 1.3.8 Maybe it has some dependencies that not installed in my system?