We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b80b05e + a0f0a40 commit 6326694Copy full SHA for 6326694
src/extensions/scratch3_boost/index.js
@@ -1888,7 +1888,13 @@ class Scratch3BoostBlocks {
1888
return false;
1889
}
1890
if (portID && this._peripheral.motor(portID)) {
1891
- return MathUtil.wrapClamp(this._peripheral.motor(portID).position, 0, 360);
+ let val = this._peripheral.motor(portID).position;
1892
+ // Boost motor A position direction is reversed by design
1893
+ // so we have to reverse the position here
1894
+ if (portID === BoostPort.A) {
1895
+ val *= -1;
1896
+ }
1897
+ return MathUtil.wrapClamp(val, 0, 360);
1898
1899
return 0;
1900
0 commit comments