Skip to content

Commit 0f59251

Browse files
authored
Merge pull request #2132 from evhan55/bugfix/2127
Make Boost set motor speed opcode yield for send interval duration
2 parents 9135780 + 9a60d10 commit 0f59251

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/extensions/scratch3_boost/index.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1804,7 +1804,11 @@ class Scratch3BoostBlocks {
18041804
}
18051805
}
18061806
});
1807-
return Promise.resolve();
1807+
return new Promise(resolve => {
1808+
window.setTimeout(() => {
1809+
resolve();
1810+
}, BoostBLE.sendInterval);
1811+
});
18081812
}
18091813

18101814
/**
@@ -1852,7 +1856,11 @@ class Scratch3BoostBlocks {
18521856
}
18531857
}
18541858
});
1855-
return Promise.resolve();
1859+
return new Promise(resolve => {
1860+
window.setTimeout(() => {
1861+
resolve();
1862+
}, BoostBLE.sendInterval);
1863+
});
18561864
}
18571865

18581866
/**

0 commit comments

Comments
 (0)