diff --git a/lpf2hub.ts b/lpf2hub.ts index 9b16044..89ec217 100644 --- a/lpf2hub.ts +++ b/lpf2hub.ts @@ -336,7 +336,7 @@ export class LPF2Hub extends Hub { } case Consts.Devices.BOOST_TACHO_MOTOR: { - const rotation = data.readInt32LE(2); + const rotation = data.readInt32LE(4); /** * Emits when a rotation sensor is activated. * @event LPF2Hub#rotate @@ -348,7 +348,7 @@ export class LPF2Hub extends Hub { } case Consts.Devices.BOOST_MOVE_HUB_MOTOR: { - const rotation = data.readInt32LE(2); + const rotation = data.readInt32LE(4); this.emit("rotate", port.id, rotation); break; } diff --git a/package.json b/package.json index 4ede279..7f34a33 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-poweredup", - "version": "1.1.9", + "version": "1.2.0", "description": "A Node.js module to interface with LEGO Powered UP components.", "homepage": "https://github.com/nathankellenicki/node-poweredup/", "main": "dist/index.js",