mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-05 02:38:53 +08:00
Fix compile error in MAVLink app
This commit is contained in:
@@ -589,7 +589,6 @@ protected:
|
||||
void send(const hrt_abstime t)
|
||||
{
|
||||
struct vehicle_status_s status = {};
|
||||
struct cpuload_s cpuload = {};
|
||||
struct battery_status_s battery_status = {};
|
||||
|
||||
const bool updated_status = _status_sub->update(&status);
|
||||
@@ -609,7 +608,7 @@ protected:
|
||||
msg.onboard_control_sensors_present = status.onboard_control_sensors_present;
|
||||
msg.onboard_control_sensors_enabled = status.onboard_control_sensors_enabled;
|
||||
msg.onboard_control_sensors_health = status.onboard_control_sensors_health;
|
||||
msg.load = cpuload.load * 1000.0f;
|
||||
msg.load = status.load * 1000.0f;
|
||||
msg.voltage_battery = (battery_status.connected) ? battery_status.voltage_filtered_v * 1000.0f : UINT16_MAX;
|
||||
msg.current_battery = (battery_status.connected) ? battery_status.current_filtered_a * 100.0f : -1;
|
||||
msg.battery_remaining = (battery_status.connected) ? battery_status.remaining * 100.0f : -1;
|
||||
|
||||
Reference in New Issue
Block a user