From e863c5e533c03465186c9f793fdf14ca28a1b781 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 13 Feb 2019 15:44:33 +1100 Subject: [PATCH] AP_Devo_Telem: use AP_SerialManager singleton --- libraries/AP_Devo_Telem/AP_Devo_Telem.cpp | 4 +++- libraries/AP_Devo_Telem/AP_Devo_Telem.h | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libraries/AP_Devo_Telem/AP_Devo_Telem.cpp b/libraries/AP_Devo_Telem/AP_Devo_Telem.cpp index f563ecb9a1..bd1f7c1fca 100644 --- a/libraries/AP_Devo_Telem/AP_Devo_Telem.cpp +++ b/libraries/AP_Devo_Telem/AP_Devo_Telem.cpp @@ -40,8 +40,10 @@ AP_DEVO_Telem::AP_DEVO_Telem() } // init - perform require initialisation including detecting which protocol to use -void AP_DEVO_Telem::init(const AP_SerialManager& serial_manager) +void AP_DEVO_Telem::init() { + const AP_SerialManager& serial_manager = AP::serialmanager(); + // check for DEVO_DPort if ((_port = serial_manager.find_serial(AP_SerialManager::SerialProtocol_Devo_Telem, 0))) { _port->set_flow_control(AP_HAL::UARTDriver::FLOW_CONTROL_DISABLE); diff --git a/libraries/AP_Devo_Telem/AP_Devo_Telem.h b/libraries/AP_Devo_Telem/AP_Devo_Telem.h index 9ad61a68dc..462c26b693 100644 --- a/libraries/AP_Devo_Telem/AP_Devo_Telem.h +++ b/libraries/AP_Devo_Telem/AP_Devo_Telem.h @@ -27,8 +27,7 @@ public: AP_DEVO_Telem(const AP_DEVO_Telem &other) = delete; AP_DEVO_Telem &operator=(const AP_DEVO_Telem&) = delete; - // init - perform require initialisation including detecting which protocol to use - void init(const AP_SerialManager& serial_manager); + void init(); // update flight control mode. The control mode is vehicle type specific void update_control_mode(uint8_t mode)