From 53d50e715c9c170628f92d716a23ff5fabd5f3f0 Mon Sep 17 00:00:00 2001 From: mmcw-dev Date: Thu, 19 Oct 2017 21:34:14 -0400 Subject: [PATCH] No pins exit message --- lib/intval/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/intval/index.js b/lib/intval/index.js index c9b309c..0e51e30 100644 --- a/lib/intval/index.js +++ b/lib/intval/index.js @@ -84,7 +84,10 @@ class Intval { * */ _undeclarePins () { - if (!this._pin) return process.exit() + if (!this._pin) { + log.warn('_undeclarePins', { reason : 'No pins'}) + return process.exit() + } log.warn('_undeclarePins', { pin : PINS.fwd.pin, val : 0, reason : 'exiting'}) this._pin.fwd.writeSync(0) log.warn('_undeclarePins', { pin : PINS.bwd.pin, val : 0, reason : 'exiting'})