mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 23:12:24 -05:00
Motor for time opcodes return promise to wait
This commit is contained in:
parent
a78866f99a
commit
b30092e890
1 changed files with 2 additions and 4 deletions
|
@ -839,16 +839,14 @@ class Scratch3Ev3Blocks {
|
||||||
const port = Cast.toNumber(args.PORT);
|
const port = Cast.toNumber(args.PORT);
|
||||||
const time = Cast.toNumber(args.TIME) * 1000;
|
const time = Cast.toNumber(args.TIME) * 1000;
|
||||||
|
|
||||||
this._device.motorTurnClockwise(port, time);
|
return this._device.motorTurnClockwise(port, time);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
motorTurnCounterClockwise (args) {
|
motorTurnCounterClockwise (args) {
|
||||||
const port = Cast.toNumber(args.PORT);
|
const port = Cast.toNumber(args.PORT);
|
||||||
const time = Cast.toNumber(args.TIME) * 1000;
|
const time = Cast.toNumber(args.TIME) * 1000;
|
||||||
|
|
||||||
this._device.motorTurnCounterClockwise(port, time);
|
return this._device.motorTurnCounterClockwise(port, time);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
motorRotate (args) {
|
motorRotate (args) {
|
||||||
|
|
Loading…
Reference in a new issue