Add more detailed logging
This commit is contained in:
parent
fee1e0e88e
commit
27cc6bafe5
@ -75,7 +75,7 @@ module.exports = {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// Boot up sanity check during debug mode
|
// Boot up sanity check during debug mode
|
||||||
debugInit() {
|
async debugInit() {
|
||||||
console.log('Resetting all output pins.');
|
console.log('Resetting all output pins.');
|
||||||
pins.forEach(async (pin) => {
|
pins.forEach(async (pin) => {
|
||||||
if (pin.mode === 'OUT') {
|
if (pin.mode === 'OUT') {
|
||||||
@ -90,11 +90,13 @@ module.exports = {
|
|||||||
case 'OUT':
|
case 'OUT':
|
||||||
this.togglePin(pin.board, err => {
|
this.togglePin(pin.board, err => {
|
||||||
if (err) throw err;
|
if (err) throw err;
|
||||||
|
console.log(`Toggled ${pin.key}`);
|
||||||
});
|
});
|
||||||
// Wait 1000ms before toggling again.
|
// Wait 1000ms before toggling again.
|
||||||
await sleep(1000);
|
await sleep(1000);
|
||||||
this.togglePin(pin.board, err => {
|
this.togglePin(pin.board, err => {
|
||||||
if (err) throw err;
|
if (err) throw err;
|
||||||
|
console.log(`Toggled ${pin.key}`);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'IN':
|
case 'IN':
|
||||||
|
Loading…
Reference in New Issue
Block a user