Browse Source

Use the correct motor for setting right cruise control

Douglas Thrift 1 year ago
parent
commit
fa37ae83e2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      rover/control.go

+ 1 - 1
rover/control.go

@@ -104,7 +104,7 @@ func control(mode driveMode, g *gamepad.Gamepad, leftMotor, rightMotor *ev3dev.T
 		case e := <-g.Right:
 			if e.IsButtonPress() && gamepadMotors {
 				var err error
-				rightCruise, err = leftMotor.Speed()
+				rightCruise, err = rightMotor.Speed()
 				if err != nil {
 					return err
 				}