Fix data type

This commit is contained in:
Skylar Grant 2023-11-17 12:39:27 -05:00
parent f0f865d2e7
commit a00e8e73a6

View File

@ -56,12 +56,12 @@ function main(gpio) {
// Set the Igniter // 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}]`); 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) { switch (config.status.igniter) {
case 0: case '0':
fn.igniter.off(gpio).then(res => { fn.igniter.off(gpio).then(res => {
if (process.env.DEBUG) console.log(`[${(Date.now() - config.timestamps.procStart)/1000}] I: ${res}`); if (process.env.DEBUG) console.log(`[${(Date.now() - config.timestamps.procStart)/1000}] I: ${res}`);
}); });
break; break;
case 1: case '1':
fn.igniter.on(gpio).then(res => { fn.igniter.on(gpio).then(res => {
if (process.env.DEBUG) console.log(`[${(Date.now() - config.timestamps.procStart)/1000}] I: ${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 // Set the Exhaust
switch (config.status.exhaust) { switch (config.status.exhaust) {
case 0: case '0':
fn.exhaust.off(gpio).then(res => { fn.exhaust.off(gpio).then(res => {
if (process.env.DEBUG) console.log(`[${(Date.now() - config.timestamps.procStart)/1000}] I: ${res}`); if (process.env.DEBUG) console.log(`[${(Date.now() - config.timestamps.procStart)/1000}] I: ${res}`);
}); });
break; break;
case 1: case '1':
fn.exhaust.on(gpio).then(res => { fn.exhaust.on(gpio).then(res => {
if (process.env.DEBUG) console.log(`[${(Date.now() - config.timestamps.procStart)/1000}] I: ${res}`); if (process.env.DEBUG) console.log(`[${(Date.now() - config.timestamps.procStart)/1000}] I: ${res}`);
}); });