Copter: nuke clang warnings
This commit is contained in:
parent
72d01aa8da
commit
11a5c8d2a4
@ -28,7 +28,7 @@ void Copter::update_throttle_hover()
|
|||||||
|
|
||||||
// calc average throttle if we are in a level hover. accounts for heli hover roll trim
|
// calc average throttle if we are in a level hover. accounts for heli hover roll trim
|
||||||
if (throttle > 0.0f && fabsf(inertial_nav.get_velocity_z_up_cms()) < 60 &&
|
if (throttle > 0.0f && fabsf(inertial_nav.get_velocity_z_up_cms()) < 60 &&
|
||||||
labs(ahrs.roll_sensor-attitude_control->get_roll_trim_cd()) < 500 && labs(ahrs.pitch_sensor) < 500) {
|
fabsf(ahrs.roll_sensor-attitude_control->get_roll_trim_cd()) < 500 && labs(ahrs.pitch_sensor) < 500) {
|
||||||
// Can we set the time constant automatically
|
// Can we set the time constant automatically
|
||||||
motors->update_throttle_hover(0.01f);
|
motors->update_throttle_hover(0.01f);
|
||||||
#if HAL_GYROFFT_ENABLED
|
#if HAL_GYROFFT_ENABLED
|
||||||
|
@ -1980,7 +1980,7 @@ bool ModeAuto::verify_circle(const AP_Mission::Mission_Command& cmd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check if we have completed circling
|
// check if we have completed circling
|
||||||
return fabsf(copter.circle_nav->get_angle_total()/M_2PI) >= LOWBYTE(cmd.p1);
|
return fabsf(copter.circle_nav->get_angle_total()/float(M_2PI)) >= LOWBYTE(cmd.p1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify_spline_wp - check if we have reached the next way point using spline
|
// verify_spline_wp - check if we have reached the next way point using spline
|
||||||
|
@ -684,7 +684,7 @@ void ModeGuided::pos_control_run()
|
|||||||
|
|
||||||
float pos_offset_z_buffer = 0.0; // Vertical buffer size in m
|
float pos_offset_z_buffer = 0.0; // Vertical buffer size in m
|
||||||
if (guided_pos_terrain_alt) {
|
if (guided_pos_terrain_alt) {
|
||||||
pos_offset_z_buffer = MIN(copter.wp_nav->get_terrain_margin() * 100.0, 0.5 * fabsf(guided_pos_target_cm.z));
|
pos_offset_z_buffer = MIN(copter.wp_nav->get_terrain_margin() * 100.0, 0.5 * fabsF(guided_pos_target_cm.z));
|
||||||
}
|
}
|
||||||
pos_control->input_pos_xyz(guided_pos_target_cm, terr_offset, pos_offset_z_buffer);
|
pos_control->input_pos_xyz(guided_pos_target_cm, terr_offset, pos_offset_z_buffer);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user