Adjust sequence

This commit is contained in:
Skylar Grant 2023-11-17 12:31:59 -05:00
parent dc3fc976d8
commit c80306271d

View File

@ -362,19 +362,22 @@ const functions = {
gpio.setup(augerPin, gpio.DIR_OUT, (err) => { gpio.setup(augerPin, gpio.DIR_OUT, (err) => {
if (err) reject(err); if (err) reject(err);
if (process.env.DEBUG) console.log('== Auger pin initialized.'); if (process.env.DEBUG) console.log('== Auger pin initialized.');
}); this.auger.ready();
// Init the Igniter pin // Init the Igniter pin
gpio.setup(igniterPin, gpio.DIR_OUT, (err) => { gpio.setup(igniterPin, gpio.DIR_OUT, (err) => {
if (err) reject(err); if (err) reject(err);
if (process.env.DEBUG) console.log('== Igniter pin initialized.'); if (process.env.DEBUG) console.log('== Igniter pin initialized.');
}); this.igniter.ready();
// Init the Exhaust pin // Init the Exhaust pin
gpio.setup(exhaustPin, gpio.DIR_OUT, (err) => { gpio.setup(exhaustPin, gpio.DIR_OUT, (err) => {
if (err) reject(err); if (err) reject(err);
if (process.env.DEBUG) console.log('== Exhaust pin initialized.'); if (process.env.DEBUG) console.log('== Exhaust pin initialized.');
}); this.exhaust.ready();
// Resolve the promise now that all pins have been initialized // Resolve the promise now that all pins have been initialized
resolve('== GPIO Initialized.'); resolve('== GPIO Initialized.');
});
});
});
} else { } else {
// Resolve the promise // Resolve the promise
resolve('== GPIO Simulated'); resolve('== GPIO Simulated');