From 4eed28046f9e6c61f194fd79b52e6ff95b7b92d6 Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Sat, 7 Dec 2024 14:57:53 -0500 Subject: [PATCH] Change logging for auger --- src/custom_modules/functions.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/custom_modules/functions.js b/src/custom_modules/functions.js index eecaf66..8bd71db 100644 --- a/src/custom_modules/functions.js +++ b/src/custom_modules/functions.js @@ -15,6 +15,9 @@ module.exports = { console.log(`DEBUG: ${message}`); } break; + case 'AUGER': + if(process.env.DEBUG_AUGER === "TRUE") console.log(`AUGER: ${message}`); + break; case 'ERROR': console.error(`ERROR: ${message}`); break; @@ -106,16 +109,16 @@ module.exports = { if (process.psState.auger.on) { mod.power.auger.on().then((res) => { // Sleep while auger is feeding - mod.log(`Auger feeding at ${process.psState.auger.feedRate}ms.`, 'DEBUG'); + mod.log(`Auger feeding at ${process.psState.auger.feedRate}ms.`, 'AUGER'); mod.sleep(process.psState.auger.feedRate).then(() => { // Turn off auger mod.power.auger.off().then((res) => { - mod.log('Auger cycle complete.', 'DEBUG'); + mod.log('Auger cycle complete.', 'AUGER'); }).catch(e => reject(e)); }); }).catch(e => reject(e)); } else { - mod.log('Auger is disabled.', 'DEBUG'); + mod.log('Auger is disabled.', 'AUGER'); } } },