Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Log and ignore errors thrown by the GPIO plugin which makes the app cras... #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions plugins/gpio/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ define([ 'pi-gpio' ], function(gpio) {
collection.find({
direction: 'input'
}).toArray(function(err, result) {
if (err) {
console.log(err);
return;
}
result.forEach(function(item) {
gpio.setDirection(parseInt(item.pin), "input", function(err) {
gpio.read(parseInt(item.pin), function(err, value) {
Expand Down