From 292d66ca33663f63d4f4637dc009b02fa83e0295 Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Sat, 7 Dec 2024 14:45:21 -0500 Subject: [PATCH] Flip exhaust for NC logic --- src/custom_modules/config.json | 2 +- src/custom_modules/functions.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/custom_modules/config.json b/src/custom_modules/config.json index 659296d..b379f39 100644 --- a/src/custom_modules/config.json +++ b/src/custom_modules/config.json @@ -40,7 +40,7 @@ "board": 15, "bcm": 22, "mode": "OUT", - "defaultState": 0 + "defaultState": 1 }, { "key": "auger", diff --git a/src/custom_modules/functions.js b/src/custom_modules/functions.js index 181be24..eecaf66 100644 --- a/src/custom_modules/functions.js +++ b/src/custom_modules/functions.js @@ -139,14 +139,14 @@ module.exports = { exhaust: { on() { return new Promise(async (resolve, reject) => { - gpio.setPin(process.pinMap.get('exhaust').board, 1).then(() => { + gpio.setPin(process.pinMap.get('exhaust').board, 0).then(() => { resolve('Exhaust powered on.'); }).catch(e => reject(e)); }); }, off() { return new Promise(async (resolve, reject) => { - gpio.setPin(process.pinMap.get('exhaust').board, 0).then(() => { + gpio.setPin(process.pinMap.get('exhaust').board, 1).then(() => { resolve('Exhaust powered off.'); }).catch(e => reject(e)); });