- if(ok) {
- deviation_y = getInt(0, "Input y deviation", chargeText(roomba)
- + "Input travelled distance on y axis in mm:", deviation_y,
- numeric_limits<int>::min(), numeric_limits<int>::max(), 1, &ok);
- if(ok) {
- cout << "input_distance=" << input_distance << " velocity=" << velocity
- << " internal_distance=" << roomba.distance() << " deviation_x="
- << deviation_x << " deviation_y=" << deviation_y
- << " encoder_ticks_left=" << sensor_data.left_encoder_counts
- << " encoder_ticks_right=" << sensor_data.right_encoder_counts
- << " batt_charge=" << sensor_data.charge << " batt_capacity="
- << sensor_data.capacity << " batt_voltage=" << sensor_data.voltage
- << " batt_current=" << sensor_data.current << endl;
- } else {
- break;
- }
- } else {
+ if(!ok) {
+ break;
+ }
+ deviation_y = getInt(0, "Input y deviation", chargeText()
+ + "Input travelled distance on y axis in mm:", deviation_y,
+ numeric_limits<int>::min(), numeric_limits<int>::max(), 1, &ok);
+ if(!ok) {