Improve igniter scripts

This commit is contained in:
Skylar Grant 2024-11-24 19:05:48 -05:00
parent 3d14c7a60a
commit 743eb6cfcf
2 changed files with 24 additions and 4 deletions

View File

@ -3,5 +3,15 @@ const gpio = require('../custom_modules/VoidGPIO.js');
const config = require('../custom_modules/config.json'); const config = require('../custom_modules/config.json');
const fn = require('../custom_modules/functions.js'); const fn = require('../custom_modules/functions.js');
fn.log('Turning on igniter'); // Variables
gpio.setPin(process.pinMap.get('igniter').board, 0); process.pinMap = new Map();
fn.log('Initializing pinMap', 'DEBUG');
for (const pin of config.pins) {
process.pinMap.set(pin.key, pin);
}
fn.log('Turning off igniter', 'INFO');
gpio.setPin(process.pinMap.get('igniter').board, 0);
fn.log('Igniter off', 'INFO');
process.exit();

View File

@ -3,5 +3,15 @@ const gpio = require('../custom_modules/VoidGPIO.js');
const config = require('../custom_modules/config.json'); const config = require('../custom_modules/config.json');
const fn = require('../custom_modules/functions.js'); const fn = require('../custom_modules/functions.js');
fn.log('Turning on igniter'); // Variables
gpio.setPin(process.pinMap.get('igniter').board, 1); process.pinMap = new Map();
fn.log('Initializing pinMap', 'DEBUG');
for (const pin of config.pins) {
process.pinMap.set(pin.key, pin);
}
fn.log('Turning on igniter', 'INFO');
gpio.setPin(process.pinMap.get('igniter').board, 1);
fn.log('Igniter on', 'INFO');
process.exit();