diff --git a/src/_EMR/main.js b/src/_EMR/main.js index c90291a..efa0392 100644 --- a/src/_EMR/main.js +++ b/src/_EMR/main.js @@ -4,6 +4,13 @@ const config = require('../custom_modules/config.json'); const fn = require('../custom_modules/functions.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 process.psState = new State(config); diff --git a/src/main.js b/src/main.js index da5e5e7..c8f656e 100644 --- a/src/main.js +++ b/src/main.js @@ -7,6 +7,13 @@ const config = require('./custom_modules/config.json'); const fn = require('./custom_modules/functions.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 process.psState = new State(config); const comms = new Communicator(process.psState);