From a00e8e73a6c37323b32bdc86456188e6bb377aed Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Fri, 17 Nov 2023 12:39:27 -0500 Subject: [PATCH] Fix data type --- main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index 9d5a09d..de86fc9 100644 --- a/main.js +++ b/main.js @@ -56,12 +56,12 @@ function main(gpio) { // Set the Igniter if (process.env.DEBUG) console.log(`[${(Date.now() - config.timestamps.procStart)/1000}] I: IGN: [${config.status.igniter}] | EXH: [${config.status.exhaust}] | AUG: [${config.status.auger}]`); switch (config.status.igniter) { - case 0: + case '0': fn.igniter.off(gpio).then(res => { if (process.env.DEBUG) console.log(`[${(Date.now() - config.timestamps.procStart)/1000}] I: ${res}`); }); break; - case 1: + case '1': fn.igniter.on(gpio).then(res => { if (process.env.DEBUG) console.log(`[${(Date.now() - config.timestamps.procStart)/1000}] I: ${res}`); }); @@ -75,12 +75,12 @@ function main(gpio) { // Set the Exhaust switch (config.status.exhaust) { - case 0: + case '0': fn.exhaust.off(gpio).then(res => { if (process.env.DEBUG) console.log(`[${(Date.now() - config.timestamps.procStart)/1000}] I: ${res}`); }); break; - case 1: + case '1': fn.exhaust.on(gpio).then(res => { if (process.env.DEBUG) console.log(`[${(Date.now() - config.timestamps.procStart)/1000}] I: ${res}`); });