From c664fca9d7990fde372561b3f3f5900033988906 Mon Sep 17 00:00:00 2001 From: Kevin Andersen Date: Tue, 9 Apr 2019 08:47:00 -0400 Subject: [PATCH] changed getMotorPosition() to use the Boost.motor()-function instead of accessing the _motors-property directly --- src/extensions/scratch3_boost/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/extensions/scratch3_boost/index.js b/src/extensions/scratch3_boost/index.js index d10535e70..debc9e860 100644 --- a/src/extensions/scratch3_boost/index.js +++ b/src/extensions/scratch3_boost/index.js @@ -1794,8 +1794,8 @@ class Scratch3BoostBlocks { log.warn('Asked for a motor position that doesnt exist!'); return false; } - if (portID && this.motor([portID])) { - return MathUtil.wrapClamp(this._peripheral._motors[portID].position, 0, 360); + if (portID && this.motor(portID)) { + return MathUtil.wrapClamp(this.motor(portID).position, 0, 360); } return 0; }