Comparing version 2.0.2 to 2.0.3
{ | ||
"name": "lba-cli", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"author": "Lebronaire", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/lebronaire/flight-control-system/tree/main/packages/cli", |
@@ -12,3 +12,3 @@ import { getConfig } from '../config'; | ||
let pinToDevice: { [pin: number]: string } = {}; | ||
let iocpToPin: { [iocpVariable: number]: number } = {}; | ||
let iocpToPin: { [iocpVariable: number]: { pin: number, device: string } } = {}; | ||
let invertedOutput: { [iocpVariable: number]: boolean } = {}; | ||
@@ -62,3 +62,6 @@ let iocpToName: { [iocpVariable: number]: string } = {}; | ||
if (cc.iocp && cc.pin) { | ||
iocpToPin[cc.iocp] = cc.pin; | ||
iocpToPin[cc.iocp] = { | ||
device: cc.arduino || '', | ||
pin: cc.pin | ||
}; | ||
pinToIOCP[`${cc.arduino}::${cc.pin}`] = cc.iocp; | ||
@@ -97,4 +100,3 @@ pinToDevice[cc.pin] = cc.arduino || ''; | ||
// Send new value to the appropriate pin via serial | ||
const pin = iocpToPin[iocpVariable]; | ||
const device = pinToDevice[pin]; | ||
const { device, pin } = iocpToPin[iocpVariable]; | ||
@@ -101,0 +103,0 @@ if (!pin || !device) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
95625
1614