Gpio must be constructed with new
This commit is contained in:
parent
9f4a773d2e
commit
2ad2aa57ab
|
@ -135,8 +135,8 @@ intval._declarePins = function () {
|
|||
let pin
|
||||
for (let p in PINS) {
|
||||
pin = PINS[p]
|
||||
if (pin.edge) intval._pin[p] = Gpio(pin.pin, pin.dir, pin.edge)
|
||||
if (!pin.edge) intval._pin[p] = Gpio(pin.pin, pin.dir)
|
||||
if (pin.edge) intval._pin[p] = new Gpio(pin.pin, pin.dir, pin.edge)
|
||||
if (!pin.edge) intval._pin[p] = new Gpio(pin.pin, pin.dir)
|
||||
log.info('_declarePins', { pin : pin.pin, dir : pin.dir, edge : pin.edge })
|
||||
}
|
||||
intval._pin.release.watch(intval._watchRelease)
|
||||
|
|
Loading…
Reference in New Issue