34 #include "../PreFlightCheck.hpp" 54 system_power_sub.update();
60 float avionics_power_rail_voltage = system_power.
voltage5v_v;
64 if (avionics_power_rail_voltage < 4.5
f) {
69 (
double)avionics_power_rail_voltage);
72 }
else if (avionics_power_rail_voltage < 4.9
f) {
74 mavlink_log_critical(mavlink_log_pub,
"CAUTION: Avionics Power low: %6.2f Volt", (
double)avionics_power_rail_voltage);
77 }
else if (avionics_power_rail_voltage > 5.4
f) {
79 mavlink_log_critical(mavlink_log_pub,
"CAUTION: Avionics Power high: %6.2f Volt", (
double)avionics_power_rail_voltage);
static orb_advert_t * mavlink_log_pub
#define mavlink_log_critical(_pub, _text,...)
Send a mavlink critical message and print to console.
static struct vehicle_status_s status
High-resolution timer with callouts and timekeeping.
#define ORB_ID(_name)
Generates a pointer to the uORB metadata structure for a given topic.
Vector< float, 6 > f(float t, const Matrix< float, 6, 1 > &, const Matrix< float, 3, 1 > &)
static hrt_abstime hrt_elapsed_time(const hrt_abstime *then)
Compute the delta between a timestamp taken in the past and now.
__BEGIN_DECLS typedef void * orb_advert_t
ORB topic advertiser handle.
static bool powerCheck(orb_advert_t *mavlink_log_pub, const vehicle_status_s &status, const bool report_fail, const bool prearm)