Browse Source

AP_BattMonitor: pass mavlink_message_t by const reference

master
Pierre Kancir 6 years ago committed by Peter Barker
parent
commit
b67bab01f6
  1. 2
      libraries/AP_BattMonitor/AP_BattMonitor.cpp

2
libraries/AP_BattMonitor/AP_BattMonitor.cpp

@ -466,7 +466,7 @@ void AP_BattMonitor::checkPoweringOff(void) @@ -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

Loading…
Cancel
Save