mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 23:12:24 -05:00
Reversing the sign on Motor A reported position.
This commit is contained in:
parent
b80b05ead7
commit
adb4c0482c
1 changed files with 5 additions and 1 deletions
|
@ -1888,7 +1888,11 @@ class Scratch3BoostBlocks {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (portID && this._peripheral.motor(portID)) {
|
if (portID && this._peripheral.motor(portID)) {
|
||||||
return MathUtil.wrapClamp(this._peripheral.motor(portID).position, 0, 360);
|
let val = MathUtil.wrapClamp(this._peripheral.motor(portID).position, 0, 360);
|
||||||
|
if (portID === BoostPort.A) {
|
||||||
|
val *= -1;
|
||||||
|
}
|
||||||
|
return val;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue