get position from this._peripheral.motor()

This commit is contained in:
Kevin Andersen 2019-04-09 16:20:21 -04:00
parent eb66855539
commit b8bbe80c4f

View file

@ -1808,8 +1808,8 @@ class Scratch3BoostBlocks {
log.warn('Asked for a motor position that doesnt exist!'); log.warn('Asked for a motor position that doesnt exist!');
return false; return false;
} }
if (portID && this.motor(portID)) { if (portID && this._peripheral.motor(portID)) {
return MathUtil.wrapClamp(this.motor(portID).position, 0, 360); return MathUtil.wrapClamp(this._peripheral.motor(portID).position, 0, 360);
} }
return 0; return 0;
} }