mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-23 22:58:10 +08:00
MAVLink app: send correct value when not estimating battery charge level
This commit is contained in:
@@ -539,7 +539,8 @@ protected:
|
||||
msg.errors_count2 = status.errors_count2;
|
||||
msg.errors_count3 = status.errors_count3;
|
||||
msg.errors_count4 = status.errors_count4;
|
||||
msg.battery_remaining = status.battery_remaining * 100.0f;
|
||||
msg.battery_remaining = (msg.voltage_battery > 0) ?
|
||||
status.battery_remaining * 100.0f : -1;
|
||||
|
||||
_mavlink->send_message(MAVLINK_MSG_ID_SYS_STATUS, &msg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user