Change logging for auger
This commit is contained in:
parent
292d66ca33
commit
4eed28046f
@ -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');
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user