Browse Source

AP_Devo_Telem: use AP_SerialManager singleton

mission-4.1.18
Peter Barker 6 years ago committed by Francisco Ferreira
parent
commit
e863c5e533
  1. 4
      libraries/AP_Devo_Telem/AP_Devo_Telem.cpp
  2. 3
      libraries/AP_Devo_Telem/AP_Devo_Telem.h

4
libraries/AP_Devo_Telem/AP_Devo_Telem.cpp

@ -40,8 +40,10 @@ AP_DEVO_Telem::AP_DEVO_Telem() @@ -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);

3
libraries/AP_Devo_Telem/AP_Devo_Telem.h

@ -27,8 +27,7 @@ public: @@ -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)

Loading…
Cancel
Save