Firmware
|
Preflight check for main system components. More...
#include "PreflightCheck.h"
#include "health_flag_helper.h"
#include "rc_check.h"
#include <math.h>
#include <parameters/param.h>
#include <systemlib/mavlink_log.h>
#include <uORB/Subscription.hpp>
#include <uORB/topics/airspeed.h>
#include <uORB/topics/differential_pressure.h>
#include <uORB/topics/estimator_status.h>
#include <uORB/topics/sensor_accel.h>
#include <uORB/topics/sensor_baro.h>
#include <uORB/topics/sensor_gyro.h>
#include <uORB/topics/sensor_mag.h>
#include <uORB/topics/sensor_preflight.h>
#include <uORB/topics/subsystem_info.h>
#include <uORB/topics/system_power.h>
Functions | |
bool | Preflight::preflightCheck (orb_advert_t *mavlink_log_pub, vehicle_status_s &status, vehicle_status_flags_s &status_flags, bool checkGNSS, bool reportFailures, bool prearm, const hrt_abstime &time_since_boot) |
Runs a preflight check on all sensors to see if they are properly calibrated and healthy. More... | |
Preflight check for main system components.
bool Preflight::preflightCheck | ( | orb_advert_t * | mavlink_log_pub, |
vehicle_status_s & | status, | ||
vehicle_status_flags_s & | status_flags, | ||
bool | checkGNSS, | ||
bool | reportFailures, | ||
bool | prearm, | ||
const hrt_abstime & | time_since_boot | ||
) |
Runs a preflight check on all sensors to see if they are properly calibrated and healthy.
The function won't fail the test if optional sensors are not found, however, it will fail the test if optional sensors are found but not in working condition.
mavlink_log_pub | Mavlink output orb handle reference for feedback when a sensor fails |
checkMag | true if the magneteometer should be checked |
checkAcc | true if the accelerometers should be checked |
checkGyro | true if the gyroscopes should be checked |
checkBaro | true if the barometer should be checked |
checkAirspeed | true if the airspeed sensor should be checked |
checkRC | true if the Remote Controller should be checked |
checkGNSS | true if the GNSS receiver should be checked |
checkPower | true if the system power should be checked |