mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 18:43:33 +08:00
vehicle_status.msg: delete unused mavlink stuff
The MAV_TYPE enum was not in sync with the mavlink specs anymore. It makes therefore sense to remove the duplication and include the correct mavlink header file where it is needed. Also, error counts which are not populated, can be scrapped.
This commit is contained in:
@@ -580,14 +580,15 @@ protected:
|
||||
msg.load = status.load * 1000.0f;
|
||||
msg.voltage_battery = status.battery_voltage * 1000.0f;
|
||||
msg.current_battery = status.battery_current * 100.0f;
|
||||
msg.drop_rate_comm = status.drop_rate_comm;
|
||||
msg.errors_comm = status.errors_comm;
|
||||
msg.errors_count1 = status.errors_count1;
|
||||
msg.errors_count2 = status.errors_count2;
|
||||
msg.errors_count3 = status.errors_count3;
|
||||
msg.errors_count4 = status.errors_count4;
|
||||
msg.battery_remaining = (status.condition_battery_voltage_valid) ?
|
||||
status.battery_remaining * 100.0f : -1;
|
||||
// TODO: fill in something useful in the fields below
|
||||
msg.drop_rate_comm = 0;
|
||||
msg.errors_comm = 0;
|
||||
msg.errors_count1 = 0;
|
||||
msg.errors_count2 = 0;
|
||||
msg.errors_count3 = 0;
|
||||
msg.errors_count4 = 0;
|
||||
|
||||
_mavlink->send_message(MAVLINK_MSG_ID_SYS_STATUS, &msg);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user