Skip to content

Commit

Permalink
AP_DroneCAN: Fix constructor initialization order
Browse files Browse the repository at this point in the history
bad ordering was leading to dronecan dna server getting initialised before canard interface is initialised leading
  • Loading branch information
bugobliterator committed Sep 20, 2024
1 parent a9ea760 commit 1ef9423
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libraries/AP_DroneCAN/AP_DroneCAN.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 /////
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1ef9423

Please sign in to comment.