This commit is contained in:
Skylar Grant 2022-11-26 22:02:25 -05:00
parent 720aaaaf3f
commit 74642e8730

View File

@ -13,7 +13,7 @@ function augerOn(err) {
if (err) throw err; if (err) throw err;
gpio.write(7, true, function(err) { gpio.write(7, true, function(err) {
if (err) throw err; if (err) throw err;
if (process.env.DEBUG) console.log('Auger turned on.'); if (process.env.DEBUG == "true") console.log('Auger turned on.');
}); });
} }
@ -22,7 +22,7 @@ function augerOff(err) {
if (err) throw err; if (err) throw err;
gpio.write(7, false, function(err) { gpio.write(7, false, function(err) {
if (err) throw err; if (err) throw err;
if (process.env.DEBUG) console.log('Auger turned off.'); if (process.env.DEBUG == "true") console.log('Auger turned off.');
}); });
} }
@ -39,7 +39,7 @@ function augerOff(err) {
function sleep(ms) { function sleep(ms) {
return new Promise((resolve) => { return new Promise((resolve) => {
setTimeout(resolve, ms); setTimeout(resolve, ms);
if (process.env.DEBUG) console.log(`Slept for ${ms}ms`); if (process.env.DEBUG == "true") console.log(`Slept for ${ms}ms`);
}); });
} }