Skip to content

Commit

Permalink
fix: move with no distance
Browse files Browse the repository at this point in the history
  • Loading branch information
Tasssadar committed Jul 10, 2024
1 parent b49bd85 commit 9c946e7
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/robot/lekce1/example-gridui/src/libs/robutek.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ export async function move(curve: number, duration?: motor.MoveDuration) {
rightMotor.move({ distance: distance * rMot })
]);
}
} else {
await Promise.all([
leftMotor.move(),
rightMotor.move()
]);
}
}

Expand Down
5 changes: 5 additions & 0 deletions docs/robot/lekce1/example1/src/libs/robutek.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ export async function move(curve: number, duration?: motor.MoveDuration) {
rightMotor.move({ distance: distance * rMot })
]);
}
} else {
await Promise.all([
leftMotor.move(),
rightMotor.move()
]);
}
}

Expand Down
5 changes: 5 additions & 0 deletions docs/robot/lekce2/blank_project/src/libs/robutek.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ export async function move(curve: number, duration?: motor.MoveDuration) {
rightMotor.move({ distance: distance * rMot })
]);
}
} else {
await Promise.all([
leftMotor.move(),
rightMotor.move()
]);
}
}

Expand Down
5 changes: 5 additions & 0 deletions docs/robot/lekce3/project3/src/libs/robutek.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ export async function move(curve: number, duration?: motor.MoveDuration) {
rightMotor.move({ distance: distance * rMot })
]);
}
} else {
await Promise.all([
leftMotor.move(),
rightMotor.move()
]);
}
}

Expand Down
5 changes: 5 additions & 0 deletions docs/robot/lekce4/project4/src/libs/robutek.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ export async function move(curve: number, duration?: motor.MoveDuration) {
rightMotor.move({ distance: distance * rMot })
]);
}
} else {
await Promise.all([
leftMotor.move(),
rightMotor.move()
]);
}
}

Expand Down
5 changes: 5 additions & 0 deletions docs/robutekLibrary/Robutek-library/src/libs/robutek.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ export async function move(curve: number, duration?: motor.MoveDuration) {
rightMotor.move({ distance: distance * rMot })
]);
}
} else {
await Promise.all([
leftMotor.move(),
rightMotor.move()
]);
}
}

Expand Down

0 comments on commit 9c946e7

Please sign in to comment.