while(true) {
// new turn velocity
velocity = getInt(0, "Input velocity", chargeText()
- + "Input turn velocity in mm/sec:", velocity, -500, 500, 10, &ok);
+ + "Input turn velocity in mm/sec:", velocity, 0, 500, 10, &ok);
if(!ok) {
break;
}
// new current angle
measured_angle = getInt(0, "Input measured angle", chargeText() + QString(
- "Orientation should be %1 degree now.\n\n").arg((cur_angle + turn_angle)
- % 360) + "Input measured angle in degree the Roomba has "
- "turned:", turn_angle, 0, numeric_limits<int>::max(), 1, &ok);
+ "Orientation should be %1 degree now.\n\n").arg((cur_angle + turn_angle
+ + 360) % 360) + "Input measured angle in degree the Roomba has turned:",
+ turn_angle, numeric_limits<int>::min(), numeric_limits<int>::max(), 1,
+ &ok);
if(!ok) {
break;
}