From 7c9e3d4b58d3320ebb65e1baae88e7a24028684e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 5 May 2015 12:35:37 +1000 Subject: [PATCH] AP_Mount: revert AP_Math class change --- libraries/AP_Mount/AP_Gimbal.cpp | 2 +- libraries/AP_Mount/AP_Mount_Servo.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/AP_Mount/AP_Gimbal.cpp b/libraries/AP_Mount/AP_Gimbal.cpp index 77ac9f3639..36bdb039a4 100644 --- a/libraries/AP_Mount/AP_Gimbal.cpp +++ b/libraries/AP_Mount/AP_Gimbal.cpp @@ -14,7 +14,7 @@ void AP_Gimbal::receive_feedback(mavlink_channel_t chan, mavlink_message_t *msg) { decode_feedback(msg); update_state(); - if (_ekf.getStatus() && !isCopterFlipped() && !AP_Math::is_zero(_gimbalParams.K_gimbalRate)){ + if (_ekf.getStatus() && !isCopterFlipped() && !is_zero(_gimbalParams.K_gimbalRate)){ send_control(chan); } diff --git a/libraries/AP_Mount/AP_Mount_Servo.cpp b/libraries/AP_Mount/AP_Mount_Servo.cpp index a096647621..1bcf0bf03b 100644 --- a/libraries/AP_Mount/AP_Mount_Servo.cpp +++ b/libraries/AP_Mount/AP_Mount_Servo.cpp @@ -154,13 +154,13 @@ void AP_Mount_Servo::stabilize() // lead filter const Vector3f &gyro = _frontend._ahrs.get_gyro(); - if (_state._stab_roll && !AP_Math::is_zero(_state._roll_stb_lead) && fabsf(_frontend._ahrs.pitch) < (float)M_PI/3.0f) { + if (_state._stab_roll && !is_zero(_state._roll_stb_lead) && fabsf(_frontend._ahrs.pitch) < (float)M_PI/3.0f) { // Compute rate of change of euler roll angle float roll_rate = gyro.x + (_frontend._ahrs.sin_pitch() / _frontend._ahrs.cos_pitch()) * (gyro.y * _frontend._ahrs.sin_roll() + gyro.z * _frontend._ahrs.cos_roll()); _angle_bf_output_deg.x -= degrees(roll_rate) * _state._roll_stb_lead; } - if (_state._stab_tilt && !AP_Math::is_zero(_state._pitch_stb_lead)) { + if (_state._stab_tilt && !is_zero(_state._pitch_stb_lead)) { // Compute rate of change of euler pitch angle float pitch_rate = _frontend._ahrs.cos_pitch() * gyro.y - _frontend._ahrs.sin_roll() * gyro.z; _angle_bf_output_deg.y -= degrees(pitch_rate) * _state._pitch_stb_lead;