Browse Source

Rover: minor format fixes

gps-1.3.1
Randy Mackay 3 years ago
parent
commit
0ecbfa5ba9
  1. 8
      Rover/GCS_Mavlink.cpp
  2. 2
      Rover/Rover.cpp

8
Rover/GCS_Mavlink.cpp

@ -1055,7 +1055,7 @@ uint8_t GCS_MAVLINK_Rover::high_latency_tgt_heading() const @@ -1055,7 +1055,7 @@ uint8_t GCS_MAVLINK_Rover::high_latency_tgt_heading() const
// need to convert -180->180 to 0->360/2
return wrap_360(control_mode->wp_bearing()) / 2;
}
return 0;
return 0;
}
uint16_t GCS_MAVLINK_Rover::high_latency_tgt_dist() const
@ -1065,7 +1065,7 @@ uint16_t GCS_MAVLINK_Rover::high_latency_tgt_dist() const @@ -1065,7 +1065,7 @@ uint16_t GCS_MAVLINK_Rover::high_latency_tgt_dist() const
// return units are dm
return MIN((control_mode->get_distance_to_destination()) / 10, UINT16_MAX);
}
return 0;
return 0;
}
uint8_t GCS_MAVLINK_Rover::high_latency_tgt_airspeed() const
@ -1084,7 +1084,7 @@ uint8_t GCS_MAVLINK_Rover::high_latency_wind_speed() const @@ -1084,7 +1084,7 @@ uint8_t GCS_MAVLINK_Rover::high_latency_wind_speed() const
// return units are m/s*5
return MIN(rover.g2.windvane.get_true_wind_speed() * 5, UINT8_MAX);
}
return 0;
return 0;
}
uint8_t GCS_MAVLINK_Rover::high_latency_wind_direction() const
@ -1093,6 +1093,6 @@ uint8_t GCS_MAVLINK_Rover::high_latency_wind_direction() const @@ -1093,6 +1093,6 @@ uint8_t GCS_MAVLINK_Rover::high_latency_wind_direction() const
// return units are deg/2
return wrap_360(degrees(rover.g2.windvane.get_true_wind_direction_rad())) / 2;
}
return 0;
return 0;
}
#endif // HAL_HIGH_LATENCY2_ENABLED

2
Rover/Rover.cpp

@ -227,7 +227,7 @@ bool Rover::get_control_output(AP_Vehicle::ControlOutput control_output, float & @@ -227,7 +227,7 @@ bool Rover::get_control_output(AP_Vehicle::ControlOutput control_output, float &
return true;
case AP_Vehicle::ControlOutput::Walking_Height:
control_value = constrain_float(g2.motors.get_walking_height(), -1.0f, 1.0f);
return true;
return true;
case AP_Vehicle::ControlOutput::Throttle:
control_value = constrain_float(g2.motors.get_throttle() / 100.0f, -1.0f, 1.0f);
return true;

Loading…
Cancel
Save