diff --git a/libraries/AP_Frsky_Telem/AP_Frsky_Telem.cpp b/libraries/AP_Frsky_Telem/AP_Frsky_Telem.cpp index 2b458b66ca..0c6958de88 100644 --- a/libraries/AP_Frsky_Telem/AP_Frsky_Telem.cpp +++ b/libraries/AP_Frsky_Telem/AP_Frsky_Telem.cpp @@ -41,10 +41,11 @@ AP_Frsky_Telem::AP_Frsky_Telem(AP_AHRS &ahrs, const AP_BattMonitor &battery, con /* * init - perform required initialisation */ -void AP_Frsky_Telem::init(const AP_SerialManager &serial_manager, - const uint8_t mav_type, +void AP_Frsky_Telem::init(const uint8_t mav_type, const uint32_t *ap_valuep) { + const AP_SerialManager &serial_manager = AP::serialmanager(); + // check for protocol configured for a serial port - only the first serial port with one of these protocols will then run (cannot have FrSky on multiple serial ports) if ((_port = serial_manager.find_serial(AP_SerialManager::SerialProtocol_FrSky_D, 0))) { _protocol = AP_SerialManager::SerialProtocol_FrSky_D; // FrSky D protocol (D-receivers) diff --git a/libraries/AP_Frsky_Telem/AP_Frsky_Telem.h b/libraries/AP_Frsky_Telem/AP_Frsky_Telem.h index 1886711af3..49640a8a06 100644 --- a/libraries/AP_Frsky_Telem/AP_Frsky_Telem.h +++ b/libraries/AP_Frsky_Telem/AP_Frsky_Telem.h @@ -123,8 +123,7 @@ public: AP_Frsky_Telem &operator=(const AP_Frsky_Telem&) = delete; // init - perform required initialisation - void init(const AP_SerialManager &serial_manager, - const uint8_t mav_type, + void init(const uint8_t mav_type, const uint32_t *ap_valuep = nullptr); // add statustext message to FrSky lib message queue