pausing while running motor
This commit is contained in:
parent
4f44238237
commit
1b51320edb
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user