AP_DroneCAN: fixed valgrind errors

This commit is contained in:
Andrew Tridgell 2023-04-07 17:43:08 +10:00
parent bdbcdfce60
commit dec4dff1d8
2 changed files with 3 additions and 2 deletions

View File

@ -914,15 +914,16 @@ void AP_DroneCAN::safety_state_send()
switch (hal.util->safety_switch_state()) {
case AP_HAL::Util::SAFETY_ARMED:
safety_msg.status = ARDUPILOT_INDICATION_SAFETYSTATE_STATUS_SAFETY_OFF;
safety_state.broadcast(safety_msg);
break;
case AP_HAL::Util::SAFETY_DISARMED:
safety_msg.status = ARDUPILOT_INDICATION_SAFETYSTATE_STATUS_SAFETY_ON;
safety_state.broadcast(safety_msg);
break;
default:
// nothing to send
break;
}
safety_state.broadcast(safety_msg);
}
{ // handle ArmingStatus

View File

@ -544,7 +544,7 @@ void AP_DroneCAN_DNA_Server::handleAllocation(const CanardRxTransfer& transfer,
rcvd_unique_id_offset += msg.unique_id.len;
//send follow up message
uavcan_protocol_dynamic_node_id_Allocation rsp;
uavcan_protocol_dynamic_node_id_Allocation rsp {};
/* Respond with the message containing the received unique ID so far
or with node id if we successfully allocated one. */