pausing while running motor

This commit is contained in:
Peli de Halleux 2017-10-24 20:20:07 -07:00
parent 4f44238237
commit 1b51320edb

View File

@ -113,13 +113,14 @@ namespace output {
//% weight=98 group="Motors" blockGap=8 //% weight=98 group="Motors" blockGap=8
onForTime(power: number, ms: number, brake = false) { onForTime(power: number, ms: number, brake = false) {
step(this.port, { step(this.port, {
speed: power, power,
step1: 0, step1: 0,
step2: ms, step2: ms,
step3: 0, step3: 0,
useSteps: false, useSteps: false,
useBrake: brake useBrake: brake
}) })
loops.pause(ms);
} }
/** /**