JamesBarwell / rpi-gpio.js

Control Raspberry Pi GPIO pins with node.js
MIT License
657 stars 116 forks source link

Fix issue #11: incorrect checking of pin validity in BCM mode #60

Closed jamesbulpin closed 6 years ago

jamesbulpin commented 7 years ago

When using BCM mode it is not possible to use pins which have a BCM pin number that is not also a valid RPI pin number. This is caused by the validation check in the getPinBcm using a list of RPI pins rather than a list of BCM pins to validate the supplied BCM pin number. The test cases also contain a similar bug that masks the failure. This PR includes fixes to the code and to the test cases.

JamesBarwell commented 7 years ago

Just wanted to say thanks and acknowledge that I have seen this, and will be looking to merge it in when I have the time to go through it.

Franco-Poveda commented 7 years ago

merge this PR please.

JamesBarwell commented 6 years ago

This is merged and published as 0.9.1.

Really appreciate the fix and the time taken to implement the tests. Apologies for being so slow to get around to testing and merging. Cheers.