Skip to content

Commit 79f8c97

Browse files
committed
Fixed bug where the robot moved with one motor faster than the other one
1 parent b5d8e9e commit 79f8c97

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/robotpilot/RobotPilot.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,13 +321,12 @@ public void close() {
321321

322322
public void setSpeed(float speed) {
323323
// Sets the speed of the robot
324-
if (this.speed != speed) {
325324
this.speed = speed;
326325
synchronizeMotors();
327326
motor1.setSpeed(speed);
328327
motor2.setSpeed(speed);
329328
motor1.endSynchronization();
330-
}
329+
331330
}
332331

333332
public void startRotate(boolean right) {

0 commit comments

Comments
 (0)