Copter: nuke clang warnings

This commit is contained in:
Andy Piper 2022-02-26 13:50:22 +00:00 committed by Peter Barker
parent 72d01aa8da
commit 11a5c8d2a4
3 changed files with 3 additions and 3 deletions

View File

@ -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
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
motors->update_throttle_hover(0.01f);
#if HAL_GYROFFT_ENABLED

View File

@ -1980,7 +1980,7 @@ bool ModeAuto::verify_circle(const AP_Mission::Mission_Command& cmd)
}
// 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

View File

@ -684,7 +684,7 @@ void ModeGuided::pos_control_run()
float pos_offset_z_buffer = 0.0; // Vertical buffer size in m
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);