AP_Frsky_Telem: use serialmanager singleton

This commit is contained in:
Peter Barker 2019-02-12 17:34:06 +11:00 committed by Francisco Ferreira
parent 54ffeef20e
commit db4b1aa7aa
2 changed files with 4 additions and 4 deletions

View File

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

View File

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