Set up pinmap
This commit is contained in:
parent
caedbda8c2
commit
ee70f34179
@ -4,6 +4,13 @@ const config = require('../custom_modules/config.json');
|
|||||||
const fn = require('../custom_modules/functions.js');
|
const fn = require('../custom_modules/functions.js');
|
||||||
const { State } = require('../custom_modules/HestiaClasses.js');
|
const { State } = require('../custom_modules/HestiaClasses.js');
|
||||||
|
|
||||||
|
// Variables
|
||||||
|
process.pinMap = new Map();
|
||||||
|
|
||||||
|
for (const pin of config.pins) {
|
||||||
|
process.pinMap.set(pin.key, pin);
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize state
|
// Initialize state
|
||||||
process.psState = new State(config);
|
process.psState = new State(config);
|
||||||
|
|
||||||
|
@ -7,6 +7,13 @@ const config = require('./custom_modules/config.json');
|
|||||||
const fn = require('./custom_modules/functions.js');
|
const fn = require('./custom_modules/functions.js');
|
||||||
const { State, Communicator } = require('./custom_modules/HestiaClasses.js');
|
const { State, Communicator } = require('./custom_modules/HestiaClasses.js');
|
||||||
|
|
||||||
|
// Variables
|
||||||
|
process.pinMap = new Map();
|
||||||
|
|
||||||
|
for (const pin of config.pins) {
|
||||||
|
process.pinMap.set(pin.key, pin);
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize state and comlink
|
// Initialize state and comlink
|
||||||
process.psState = new State(config);
|
process.psState = new State(config);
|
||||||
const comms = new Communicator(process.psState);
|
const comms = new Communicator(process.psState);
|
||||||
|
Loading…
Reference in New Issue
Block a user