From 6422f93a30c840a9b6f41e5effdc6b8a26901156 Mon Sep 17 00:00:00 2001 From: bugobliterator Date: Fri, 20 Sep 2024 15:39:22 +1000 Subject: [PATCH] AP_DroneCAN: Fix constructor initialization order bad ordering was leading to dronecan getting initialised before canard interface leading to bad index setup --- libraries/AP_DroneCAN/AP_DroneCAN.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/AP_DroneCAN/AP_DroneCAN.h b/libraries/AP_DroneCAN/AP_DroneCAN.h index e1b713d33f1ad5..7264fad9472fcd 100644 --- a/libraries/AP_DroneCAN/AP_DroneCAN.h +++ b/libraries/AP_DroneCAN/AP_DroneCAN.h @@ -235,10 +235,12 @@ class AP_DroneCAN : public AP_CANDriver, public AP_ESC_Telem_Backend { uint32_t *mem_pool; - AP_DroneCAN_DNA_Server _dna_server; - uint8_t _driver_index; + CanardInterface canard_iface; + + AP_DroneCAN_DNA_Server _dna_server; + char _thread_name[13]; bool _initialized; ///// SRV output ///// @@ -292,8 +294,6 @@ class AP_DroneCAN : public AP_CANDriver, public AP_ESC_Telem_Backend { } _relay; #endif - CanardInterface canard_iface; - #if AP_DRONECAN_SERIAL_ENABLED AP_DroneCAN_Serial serial; #endif