We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cfc2e21 + a4987ce commit dde7be9Copy full SHA for dde7be9
lib/gpio.js
@@ -229,7 +229,8 @@ GPIO.prototype._get = function(fn) {
229
GPIO.prototype.set = function(v, fn) {
230
var self = this;
231
var callback = typeof v === 'function' ? v : fn;
232
- if(typeof v !== "number" || v !== 0) v = 1;
+ if (typeof v === "boolean" || ) v = v ? 1 : 0;
233
+ if (typeof v !== "number" || v !== 0) v = 1;
234
235
// if direction is out, just emit change event since we can reliably predict
236
// if the value has changed; we don't have to rely on watching a file
0 commit comments