mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 08:38:36 -04:00
AP_L1_Control: fixed some warnings
This commit is contained in:
parent
05c325a12a
commit
59610ebe88
@ -114,9 +114,9 @@ float AP_L1_Control::crosstrack_error(void) const
|
||||
*/
|
||||
void AP_L1_Control::_prevent_indecision(float &Nu)
|
||||
{
|
||||
const float Nu_limit = 0.9f*M_PI;
|
||||
if (fabs(Nu) > Nu_limit &&
|
||||
fabs(_last_Nu) > Nu_limit &&
|
||||
const float Nu_limit = 0.9f*M_PI_F;
|
||||
if (fabsf(Nu) > Nu_limit &&
|
||||
fabsf(_last_Nu) > Nu_limit &&
|
||||
fabsf(wrap_180_cd(_target_bearing_cd - _ahrs.yaw_sensor)) > 12000 &&
|
||||
Nu * _last_Nu < 0.0f) {
|
||||
// we are moving away from the target waypoint and pointing
|
||||
@ -269,7 +269,7 @@ void AP_L1_Control::update_loiter(const struct Location ¢er_WP, float radius
|
||||
// if too close to the waypoint, use the velocity vector
|
||||
// if the velocity vector is too small, use the heading vector
|
||||
Vector2f A_air_unit;
|
||||
if (A_air.length() > 0.1) {
|
||||
if (A_air.length() > 0.1f) {
|
||||
A_air_unit = A_air.normalized();
|
||||
} else {
|
||||
if (_groundspeed_vector.length() < 0.1f) {
|
||||
|
Loading…
Reference in New Issue
Block a user