diff --git a/libraries/AP_DroneCAN/AP_DroneCAN.cpp b/libraries/AP_DroneCAN/AP_DroneCAN.cpp index be43ab7ac0..7a3651ce14 100644 --- a/libraries/AP_DroneCAN/AP_DroneCAN.cpp +++ b/libraries/AP_DroneCAN/AP_DroneCAN.cpp @@ -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 diff --git a/libraries/AP_DroneCAN/AP_DroneCAN_DNA_Server.cpp b/libraries/AP_DroneCAN/AP_DroneCAN_DNA_Server.cpp index 073265d9b5..0a703b7d20 100644 --- a/libraries/AP_DroneCAN/AP_DroneCAN_DNA_Server.cpp +++ b/libraries/AP_DroneCAN/AP_DroneCAN_DNA_Server.cpp @@ -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. */