From cc4fc42ed0d6a03d045460e882bda3df64783b02 Mon Sep 17 00:00:00 2001 From: bugobliterator Date: Thu, 22 Jul 2021 22:22:29 +0530 Subject: [PATCH] AP_RangeFinder: use separate register_driver method while contructing CAN Driver --- libraries/AP_RangeFinder/AP_RangeFinder_USD1_CAN.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/AP_RangeFinder/AP_RangeFinder_USD1_CAN.cpp b/libraries/AP_RangeFinder/AP_RangeFinder_USD1_CAN.cpp index 141441f5aa..578f8f559b 100644 --- a/libraries/AP_RangeFinder/AP_RangeFinder_USD1_CAN.cpp +++ b/libraries/AP_RangeFinder/AP_RangeFinder_USD1_CAN.cpp @@ -7,9 +7,10 @@ constructor */ AP_RangeFinder_USD1_CAN::AP_RangeFinder_USD1_CAN(RangeFinder::RangeFinder_State &_state, AP_RangeFinder_Params &_params) : - CANSensor("USD1", AP_CANManager::Driver_Type_USD1), + CANSensor("USD1"), AP_RangeFinder_Backend(_state, _params) { + register_driver(AP_CANManager::Driver_Type_USD1); } // update state