fixing single motor set speed

This commit is contained in:
Peli de Halleux 2017-12-18 09:17:19 -08:00
parent 363e076f36
commit d07f672b28

View File

@ -242,6 +242,9 @@ namespace motors {
const b = mkCmd(this._port, DAL.opOutputSpeed, 1) const b = mkCmd(this._port, DAL.opOutputSpeed, 1)
b.setNumber(NumberFormat.Int8LE, 2, speed) b.setNumber(NumberFormat.Int8LE, 2, speed)
writePWM(b) writePWM(b)
if (speed) {
writePWM(mkCmd(this._port, DAL.opOutputStart, 0))
}
} }
private __move(steps: boolean, stepsOrTime: number, speed: number) { private __move(steps: boolean, stepsOrTime: number, speed: number) {