mirror of https://github.com/ArduPilot/ardupilot
AP_Frsky_Telem: use serialmanager singleton
This commit is contained in:
parent
54ffeef20e
commit
db4b1aa7aa
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue