Closed Achronite closed 4 years ago
Yes, noted. I did this with the other modules I think (return codes in radio etc), but the gpio was imported from a different project and I never did that. It's on the list, thanks for logging it.
It's because I'm trying to get this working with home-assistant (hass.io) via the node-red support. I'm having difficult getting the radio version. I suspect it may be due to either gpio being locked down, or that the gpio device may be different in the underlying O/S, hence the need to return the status code.
@whaleygeek fixed in my code base if you want a look :)
@whaleygeek's original code uses 'exit' to bomb out when there are hardware errors. This is not appropriate within the context of node.js, we should be returning values via the C calls instead, so appropriate action can be taken.
For example in gpio_rpi.c, gpio_init().