mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 15:43:34 +08:00
EKF: use ECL printfs everywhere
- Changes all printfs to ECL printfs - Add ECL_ERR. - Include ecl.h where needed. - Add forgotten pragma once.
This commit is contained in:
+11
-10
@@ -39,6 +39,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <ecl/ecl.h>
|
||||
#include "ekf.h"
|
||||
|
||||
void Ekf::controlFusionModes()
|
||||
@@ -79,7 +80,7 @@ void Ekf::controlExternalVisionAiding()
|
||||
if (_time_last_imu - _time_last_ext_vision < 2 * EV_MAX_INTERVAL) {
|
||||
// turn on use of external vision measurements for position and height
|
||||
_control_status.flags.ev_pos = true;
|
||||
printf("EKF switching to external vision position fusion\n");
|
||||
ECL_INFO("EKF switching to external vision position fusion");
|
||||
// turn off other forms of height aiding
|
||||
_control_status.flags.baro_hgt = false;
|
||||
_control_status.flags.gps_hgt = false;
|
||||
@@ -119,7 +120,7 @@ void Ekf::controlExternalVisionAiding()
|
||||
_control_status.flags.mag_3D = false;
|
||||
_control_status.flags.mag_dec = false;
|
||||
|
||||
printf("EKF switching to external vision yaw fusion\n");
|
||||
ECL_INFO("EKF switching to external vision yaw fusion");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -326,7 +327,7 @@ void Ekf::controlHeightSensorTimeouts()
|
||||
_control_status.flags.ev_hgt = false;
|
||||
// request a reset
|
||||
reset_height = true;
|
||||
printf("EKF baro hgt timeout - reset to GPS\n");
|
||||
ECL_INFO("EKF baro hgt timeout - reset to GPS");
|
||||
} else if (reset_to_baro){
|
||||
// set height sensor health
|
||||
_baro_hgt_faulty = false;
|
||||
@@ -337,7 +338,7 @@ void Ekf::controlHeightSensorTimeouts()
|
||||
_control_status.flags.ev_hgt = false;
|
||||
// request a reset
|
||||
reset_height = true;
|
||||
printf("EKF baro hgt timeout - reset to baro\n");
|
||||
ECL_INFO("EKF baro hgt timeout - reset to baro");
|
||||
} else {
|
||||
// we have nothing we can reset to
|
||||
// deny a reset
|
||||
@@ -377,7 +378,7 @@ void Ekf::controlHeightSensorTimeouts()
|
||||
_control_status.flags.ev_hgt = false;
|
||||
// request a reset
|
||||
reset_height = true;
|
||||
printf("EKF gps hgt timeout - reset to baro\n");
|
||||
ECL_INFO("EKF gps hgt timeout - reset to baro");
|
||||
} else if (reset_to_gps) {
|
||||
// set height sensor health
|
||||
_gps_hgt_faulty = false;
|
||||
@@ -388,7 +389,7 @@ void Ekf::controlHeightSensorTimeouts()
|
||||
_control_status.flags.ev_hgt = false;
|
||||
// request a reset
|
||||
reset_height = true;
|
||||
printf("EKF gps hgt timeout - reset to GPS\n");
|
||||
ECL_INFO("EKF gps hgt timeout - reset to GPS");
|
||||
} else {
|
||||
// we have nothing to reset to
|
||||
reset_height = false;
|
||||
@@ -421,7 +422,7 @@ void Ekf::controlHeightSensorTimeouts()
|
||||
_control_status.flags.ev_hgt = false;
|
||||
// request a reset
|
||||
reset_height = true;
|
||||
printf("EKF rng hgt timeout - reset to baro\n");
|
||||
ECL_INFO("EKF rng hgt timeout - reset to baro");
|
||||
} else if (reset_to_rng) {
|
||||
// set height sensor health
|
||||
_rng_hgt_faulty = false;
|
||||
@@ -432,7 +433,7 @@ void Ekf::controlHeightSensorTimeouts()
|
||||
_control_status.flags.ev_hgt = false;
|
||||
// request a reset
|
||||
reset_height = true;
|
||||
printf("EKF rng hgt timeout - reset to rng hgt\n");
|
||||
ECL_INFO("EKF rng hgt timeout - reset to rng hgt");
|
||||
} else {
|
||||
// we have nothing to reset to
|
||||
reset_height = false;
|
||||
@@ -465,7 +466,7 @@ void Ekf::controlHeightSensorTimeouts()
|
||||
_control_status.flags.ev_hgt = false;
|
||||
// request a reset
|
||||
reset_height = true;
|
||||
printf("EKF ev hgt timeout - reset to baro\n");
|
||||
ECL_INFO("EKF ev hgt timeout - reset to baro");
|
||||
} else if (reset_to_ev) {
|
||||
// reset the height mode
|
||||
_control_status.flags.baro_hgt = false;
|
||||
@@ -474,7 +475,7 @@ void Ekf::controlHeightSensorTimeouts()
|
||||
_control_status.flags.ev_hgt = true;
|
||||
// request a reset
|
||||
reset_height = true;
|
||||
printf("EKF ev hgt timeout - reset to ev hgt\n");
|
||||
ECL_INFO("EKF ev hgt timeout - reset to ev hgt");
|
||||
} else {
|
||||
// we have nothing to reset to
|
||||
reset_height = false;
|
||||
|
||||
Reference in New Issue
Block a user