diff --git a/libraries/AP_OpenDroneID/AP_OpenDroneID.h b/libraries/AP_OpenDroneID/AP_OpenDroneID.h index e3d8eaa21a..217ada58b7 100644 --- a/libraries/AP_OpenDroneID/AP_OpenDroneID.h +++ b/libraries/AP_OpenDroneID/AP_OpenDroneID.h @@ -63,7 +63,7 @@ #define ODID_AREA_COUNT_MIN 1 #define ODID_AREA_COUNT_MAX 65000 -class AP_UAVCAN; +class AP_DroneCAN; class AP_OpenDroneID { @@ -81,7 +81,7 @@ public: void update(); // send pending dronecan messages - void dronecan_send(AP_UAVCAN *); + void dronecan_send(AP_DroneCAN *); // handle a message from the GCS void handle_msg(mavlink_channel_t chan, const mavlink_message_t &msg); @@ -193,12 +193,12 @@ private: uint8_t dronecan_done_init; uint8_t dronecan_init_failed; - void dronecan_init(AP_UAVCAN *uavcan); - void dronecan_send_location(AP_UAVCAN *uavcan); - void dronecan_send_basic_id(AP_UAVCAN *uavcan); - void dronecan_send_system(AP_UAVCAN *uavcan); - void dronecan_send_self_id(AP_UAVCAN *uavcan); - void dronecan_send_operator_id(AP_UAVCAN *uavcan); + void dronecan_init(AP_DroneCAN *uavcan); + void dronecan_send_location(AP_DroneCAN *uavcan); + void dronecan_send_basic_id(AP_DroneCAN *uavcan); + void dronecan_send_system(AP_DroneCAN *uavcan); + void dronecan_send_self_id(AP_DroneCAN *uavcan); + void dronecan_send_operator_id(AP_DroneCAN *uavcan); }; namespace AP diff --git a/libraries/AP_OpenDroneID/AP_OpenDroneID_DroneCAN.cpp b/libraries/AP_OpenDroneID/AP_OpenDroneID_DroneCAN.cpp index 8d374ac108..30887b9da5 100644 --- a/libraries/AP_OpenDroneID/AP_OpenDroneID_DroneCAN.cpp +++ b/libraries/AP_OpenDroneID/AP_OpenDroneID_DroneCAN.cpp @@ -20,7 +20,7 @@ #if AP_OPENDRONEID_ENABLED -#include +#include #if HAL_ENABLE_LIBUAVCAN_DRIVERS #include @@ -31,9 +31,9 @@ static Canard::Publisher* dc_self_id[HAL_MAX_CAN_PROTO static Canard::Publisher* dc_system[HAL_MAX_CAN_PROTOCOL_DRIVERS]; static Canard::Publisher* dc_operator_id[HAL_MAX_CAN_PROTOCOL_DRIVERS]; -static void handle_arm_status(AP_UAVCAN* ap_uavcan, const CanardRxTransfer &transfer, const dronecan_remoteid_ArmStatus &msg); +static void handle_arm_status(AP_DroneCAN* ap_dronecan, const CanardRxTransfer &transfer, const dronecan_remoteid_ArmStatus &msg); -void AP_OpenDroneID::dronecan_init(AP_UAVCAN *uavcan) +void AP_OpenDroneID::dronecan_init(AP_DroneCAN *uavcan) { const uint8_t driver_index = uavcan->get_driver_index(); const uint8_t driver_mask = 1U<get_driver_index(); const uint8_t driver_mask = 1U<get_driver_index()]->broadcast(msg); } -void AP_OpenDroneID::dronecan_send_basic_id(AP_UAVCAN *uavcan) +void AP_OpenDroneID::dronecan_send_basic_id(AP_DroneCAN *uavcan) { dronecan_remoteid_BasicID msg {}; const auto &pkt = pkt_basic_id; @@ -175,7 +175,7 @@ void AP_OpenDroneID::dronecan_send_basic_id(AP_UAVCAN *uavcan) dc_basic_id[uavcan->get_driver_index()]->broadcast(msg); } -void AP_OpenDroneID::dronecan_send_system(AP_UAVCAN *uavcan) +void AP_OpenDroneID::dronecan_send_system(AP_DroneCAN *uavcan) { dronecan_remoteid_System msg {}; const auto &pkt = pkt_system; @@ -195,7 +195,7 @@ void AP_OpenDroneID::dronecan_send_system(AP_UAVCAN *uavcan) dc_system[uavcan->get_driver_index()]->broadcast(msg); } -void AP_OpenDroneID::dronecan_send_self_id(AP_UAVCAN *uavcan) +void AP_OpenDroneID::dronecan_send_self_id(AP_DroneCAN *uavcan) { dronecan_remoteid_SelfID msg {}; const auto &pkt = pkt_self_id; @@ -205,7 +205,7 @@ void AP_OpenDroneID::dronecan_send_self_id(AP_UAVCAN *uavcan) dc_self_id[uavcan->get_driver_index()]->broadcast(msg); } -void AP_OpenDroneID::dronecan_send_operator_id(AP_UAVCAN *uavcan) +void AP_OpenDroneID::dronecan_send_operator_id(AP_DroneCAN *uavcan) { dronecan_remoteid_OperatorID msg {}; const auto &pkt = pkt_operator_id; @@ -218,7 +218,7 @@ void AP_OpenDroneID::dronecan_send_operator_id(AP_UAVCAN *uavcan) /* handle ArmStatus message from DroneCAN */ -static void handle_arm_status(AP_UAVCAN *ap_uavcan, const CanardRxTransfer& transfer, const dronecan_remoteid_ArmStatus &msg) +static void handle_arm_status(AP_DroneCAN *ap_dronecan, const CanardRxTransfer& transfer, const dronecan_remoteid_ArmStatus &msg) { mavlink_open_drone_id_arm_status_t status {};