AP_Devo_Telem: use AP_SerialManager singleton

This commit is contained in:
Peter Barker 2019-02-13 15:44:33 +11:00 committed by Francisco Ferreira
parent 97a6ead690
commit e863c5e533
2 changed files with 4 additions and 3 deletions

View File

@ -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);

View File

@ -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)