Flip exhaust for NC logic

This commit is contained in:
Skylar Grant 2024-12-07 14:45:21 -05:00
parent 51ea67b83b
commit 292d66ca33
2 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@
"board": 15, "board": 15,
"bcm": 22, "bcm": 22,
"mode": "OUT", "mode": "OUT",
"defaultState": 0 "defaultState": 1
}, },
{ {
"key": "auger", "key": "auger",

View File

@ -139,14 +139,14 @@ module.exports = {
exhaust: { exhaust: {
on() { on() {
return new Promise(async (resolve, reject) => { 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.'); resolve('Exhaust powered on.');
}).catch(e => reject(e)); }).catch(e => reject(e));
}); });
}, },
off() { off() {
return new Promise(async (resolve, reject) => { 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.'); resolve('Exhaust powered off.');
}).catch(e => reject(e)); }).catch(e => reject(e));
}); });