From 7ac642ee30eacd95fac959d956bb2026a1a5aebe Mon Sep 17 00:00:00 2001 From: mmcw-dev Date: Mon, 23 Oct 2017 13:32:45 -0400 Subject: [PATCH] Accidentally commented out gpio from intval module --- lib/intval/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/intval/index.js b/lib/intval/index.js index 9699508..52d37bd 100644 --- a/lib/intval/index.js +++ b/lib/intval/index.js @@ -6,7 +6,7 @@ const fs = require('fs') let Gpio try { - //Gpio = require('onoff').Gpio + Gpio = require('onoff').Gpio } catch (e) { log.warn('Failed including Gpio, using sim') Gpio = require('../../lib/onoffsim').Gpio @@ -283,6 +283,12 @@ intval._releaseClosedState = function (now) { } return false } + +intval.reset = function () { + intval._setState(undefined) + intval._storeState() +} + /** * Set the default direction of the camera. * * forward = true