msfs-simconnect-api-wrapper
Advanced tools
Comparing version 1.1.9 to 1.1.10
@@ -150,2 +150,7 @@ import { | ||
const def = defs[pos]; | ||
if (def === undefined) { | ||
handle.clearDataDefinition(DATA_ID); | ||
this.releaseId(DATA_ID); | ||
throw new Error(`Cannot get SimVar: "${propName}" unknown.`); | ||
} | ||
handle.addToDataDefinition( | ||
@@ -230,2 +235,6 @@ DATA_ID, | ||
const def = SimVars[propName]; | ||
if (def === undefined) { | ||
this.releaseId(DATA_ID); | ||
throw new Error(`Cannot set SimVar: "${propName}" unknown.`); | ||
} | ||
const bufferLength = 100; // TODO: we probably want to allocate only as much buffer as we actually need | ||
@@ -232,0 +241,0 @@ const buffer = def.write(new RawBuffer(bufferLength), value); |
{ | ||
"name": "msfs-simconnect-api-wrapper", | ||
"version": "1.1.9", | ||
"version": "1.1.10", | ||
"description": "A convenient SimConnect API for playing with Microsoft Flight Simulator 2020", | ||
@@ -5,0 +5,0 @@ "main": "msfs-api.js", |
231541
6720