AP_BattMonitor: correct use of random stack data

This commit is contained in:
Peter Barker 2019-01-29 13:03:11 +11:00 committed by Randy Mackay
parent 35928a8d05
commit ef699367d5
1 changed files with 1 additions and 1 deletions

View File

@ -477,7 +477,7 @@ void AP_BattMonitor::checkPoweringOff(void)
// Send a Mavlink broadcast announcing the shutdown
mavlink_message_t msg;
mavlink_command_long_t cmd_msg;
mavlink_command_long_t cmd_msg{};
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);