mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 23:12:24 -05:00
changed getMotorPosition() to use the Boost.motor()-function instead of accessing the _motors-property directly
This commit is contained in:
parent
ecbbacd4c0
commit
c664fca9d7
1 changed files with 2 additions and 2 deletions
|
@ -1794,8 +1794,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.motor(portID)) {
|
||||||
return MathUtil.wrapClamp(this._peripheral._motors[portID].position, 0, 360);
|
return MathUtil.wrapClamp(this.motor(portID).position, 0, 360);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue