Adjust sequence
This commit is contained in:
parent
dc3fc976d8
commit
c80306271d
@ -362,19 +362,22 @@ const functions = {
|
||||
gpio.setup(augerPin, gpio.DIR_OUT, (err) => {
|
||||
if (err) reject(err);
|
||||
if (process.env.DEBUG) console.log('== Auger pin initialized.');
|
||||
this.auger.ready();
|
||||
// Init the Igniter pin
|
||||
gpio.setup(igniterPin, gpio.DIR_OUT, (err) => {
|
||||
if (err) reject(err);
|
||||
if (process.env.DEBUG) console.log('== Igniter pin initialized.');
|
||||
this.igniter.ready();
|
||||
// Init the Exhaust pin
|
||||
gpio.setup(exhaustPin, gpio.DIR_OUT, (err) => {
|
||||
if (err) reject(err);
|
||||
if (process.env.DEBUG) console.log('== Exhaust pin initialized.');
|
||||
this.exhaust.ready();
|
||||
// Resolve the promise now that all pins have been initialized
|
||||
resolve('== GPIO Initialized.');
|
||||
});
|
||||
});
|
||||
});
|
||||
// Init the Igniter pin
|
||||
gpio.setup(igniterPin, gpio.DIR_OUT, (err) => {
|
||||
if (err) reject(err);
|
||||
if (process.env.DEBUG) console.log('== Igniter pin initialized.');
|
||||
});
|
||||
// Init the Exhaust pin
|
||||
gpio.setup(exhaustPin, gpio.DIR_OUT, (err) => {
|
||||
if (err) reject(err);
|
||||
if (process.env.DEBUG) console.log('== Exhaust pin initialized.');
|
||||
});
|
||||
// Resolve the promise now that all pins have been initialized
|
||||
resolve('== GPIO Initialized.');
|
||||
} else {
|
||||
// Resolve the promise
|
||||
resolve('== GPIO Simulated');
|
||||
|
Loading…
Reference in New Issue
Block a user