Improve igniter scripts
This commit is contained in:
parent
3d14c7a60a
commit
743eb6cfcf
@ -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
|
||||||
|
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);
|
gpio.setPin(process.pinMap.get('igniter').board, 0);
|
||||||
|
fn.log('Igniter off', 'INFO');
|
||||||
|
process.exit();
|
@ -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
|
||||||
|
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);
|
gpio.setPin(process.pinMap.get('igniter').board, 1);
|
||||||
|
fn.log('Igniter on', 'INFO');
|
||||||
|
process.exit();
|
Loading…
Reference in New Issue
Block a user