mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 06:52:40 -05:00
Merge pull request #2235 from knandersen/bugfix/2232
Fix 2232 by using unregulated motor command to turn off motors
This commit is contained in:
commit
5828149827
1 changed files with 4 additions and 5 deletions
|
@ -160,6 +160,7 @@ const BoostMessage = {
|
|||
* @enum {number}
|
||||
*/
|
||||
const BoostOutputSubCommand = {
|
||||
START_POWER: 0x01,
|
||||
START_POWER_PAIR: 0x02,
|
||||
SET_ACC_TIME: 0x05,
|
||||
SET_DEC_TIME: 0x06,
|
||||
|
@ -541,12 +542,10 @@ class BoostMotor {
|
|||
turnOff (useLimiter = true) {
|
||||
const cmd = this._parent.generateOutputCommand(
|
||||
this._index,
|
||||
BoostOutputExecution.EXECUTE_IMMEDIATELY ^ BoostOutputExecution.COMMAND_FEEDBACK,
|
||||
BoostOutputSubCommand.START_SPEED,
|
||||
BoostOutputExecution.EXECUTE_IMMEDIATELY,
|
||||
BoostOutputSubCommand.START_POWER,
|
||||
[
|
||||
BoostMotorEndState.FLOAT,
|
||||
BoostMotorEndState.FLOAT,
|
||||
BoostMotorProfile.DO_NOT_USE
|
||||
BoostMotorEndState.FLOAT
|
||||
]
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue