diff options
author | Determinant <[email protected]> | 2024-08-17 18:40:42 -0700 |
---|---|---|
committer | Determinant <[email protected]> | 2024-08-17 18:40:42 -0700 |
commit | 1a29d82a501518ffb63f06f0ce6716ed7de386de (patch) | |
tree | 6204749964376cc934161dbb4e2ac480b405c61b /xplane.mjs | |
parent | f3b2a64641d0d137b26ed16601123edd20bec0ae (diff) |
...
Diffstat (limited to 'xplane.mjs')
-rw-r--r-- | xplane.mjs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -6,7 +6,7 @@ export class XPlane { this.subscribed = []; this.xplaneAddr = xplaneAddr; this.xplanePort = xplanePort; - this.socket.on("message", (msg, rinfo) => { + this.socket.on("message", async (msg, rinfo) => { if (msg.subarray(0, 5).toString() != "RREF,") { console.info("dropping unrelated message"); return; @@ -24,7 +24,7 @@ export class XPlane { } const v = msg.readFloatLE(9 + i * 8); //console.info(`${this.subscribed[idx].ref} = ${v}`); - this.subscribed[idx].handler(v); + await this.subscribed[idx].handler(v); } }); this.socket.bind(0); |