From ee70f34179400d8dd54ddd75d86d82e79d4d61b2 Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Sun, 24 Nov 2024 18:16:34 -0500 Subject: [PATCH] Set up pinmap --- src/_EMR/main.js | 7 +++++++ src/main.js | 7 +++++++ 2 files changed, 14 insertions(+) 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);