mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 06:11:37 +08:00
Fixed parenthesis bug
Clang found the following:
if (fabsf(airspeed.indicated_airspeed_m_s > 6.0f))
which is doing fsbsf( bool )
Fixed to be:
if (fabsf(airspeed.indicated_airspeed_m_s) > 6.0f)
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -40,7 +40,7 @@
|
|||||||
* @author Johan Jansen <jnsn.johan@gmail.com>
|
* @author Johan Jansen <jnsn.johan@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <px4_config.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -259,7 +259,7 @@ static bool airspeedCheck(int mavlink_fd, bool optional)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fabsf(airspeed.indicated_airspeed_m_s > 6.0f)) {
|
if (fabsf(airspeed.indicated_airspeed_m_s) > 6.0f) {
|
||||||
mavlink_log_critical(mavlink_fd, "AIRSPEED WARNING: WIND OR CALIBRATION ISSUE");
|
mavlink_log_critical(mavlink_fd, "AIRSPEED WARNING: WIND OR CALIBRATION ISSUE");
|
||||||
// XXX do not make this fatal yet
|
// XXX do not make this fatal yet
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user