pause until motor measured move is done

This commit is contained in:
Peli de Halleux 2018-01-10 11:29:27 -08:00
parent 9912d68c8b
commit b9f5096480

View File

@ -226,6 +226,7 @@ namespace motors {
this._setSpeed(speed); this._setSpeed(speed);
return; return;
} }
// timed motor moves
let useSteps: boolean; let useSteps: boolean;
let stepsOrTime: number; let stepsOrTime: number;
switch (unit) { switch (unit) {
@ -248,6 +249,8 @@ namespace motors {
} }
this._move(useSteps, stepsOrTime, speed); this._move(useSteps, stepsOrTime, speed);
// wait till motor is done with this work
this.pauseUntilReady();
} }
/** /**