()
| 78 | const self = this; |
| 79 | this.config = config; |
| 80 | const callback = () => { |
| 81 | log(`log: GPIO: ${self.getName()}: open:`); |
| 82 | self.port.on('change', (value) => { |
| 83 | value = Boolean(value); |
| 84 | log(`log: GPIO: ${self.getName()}: change: ${value}`); |
| 85 | self.value.notifyOfExternalUpdate(value); |
| 86 | }); |
| 87 | }; |
| 88 | this.port = gpio.export(config.pin, |
| 89 | {direction: 'in', ready: callback}); |
| 90 | } |
nothing calls this directly
no test coverage detected