car_srv: rotation small fix

This commit is contained in:
e5l
2016-09-02 10:19:14 +03:00
parent f2cc0337cd
commit 29cef52317
@@ -28,13 +28,13 @@ class RoomScanner(val controller: CarController) : Thread() {
val dots = mutableListOf<Pair<Double, Double>>()
for (i in arrayOf(0.0, 90.0, 180.0, 270.0)) {
controller.rotateLeftWithCorrection(90.0)
dots.addAll(controller.scan(horizon).mapIndexed { i: Int, d: Double -> controller.convertToPoint((i * 5 - 180).toDouble(), d) })
controller.drive(CarController.Direction.FORWARD, 10)
controller.drive(CarController.Direction.BACKWARD, 10)
controller.rotateLeftWithCorrection(90.0)
}
controller.rotateLeftWithCorrection(90.0)
return dots
}