AP_BattMonitor: pass mavlink_message_t by const reference

This commit is contained in:
Pierre Kancir 2019-04-30 12:22:48 +02:00 committed by Peter Barker
parent 78cd3cc722
commit b67bab01f6
1 changed files with 1 additions and 1 deletions

View File

@ -466,7 +466,7 @@ void AP_BattMonitor::checkPoweringOff(void)
cmd_msg.command = MAV_CMD_POWER_OFF_INITIATED;
cmd_msg.param1 = i+1;
mavlink_msg_command_long_encode(mavlink_system.sysid, MAV_COMP_ID_ALL, &msg, &cmd_msg);
GCS_MAVLINK::send_to_components(&msg);
GCS_MAVLINK::send_to_components(msg);
gcs().send_text(MAV_SEVERITY_WARNING, "Vehicle %d battery %d is powering off", mavlink_system.sysid, i+1);
// only send this once