Set up pinmap

This commit is contained in:
Skylar Grant 2024-11-24 18:16:34 -05:00
parent caedbda8c2
commit ee70f34179
2 changed files with 14 additions and 0 deletions

View File

@ -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);

View File

@ -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);