mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-03 04:03:59 -04:00
Mount: integrate Serial Manager instance
This commit is contained in:
parent
cbcd32d698
commit
1ed7737669
@ -6,7 +6,7 @@ extern const AP_HAL::HAL& hal;
|
|||||||
void AP_Mount_Alexmos::init(const AP_SerialManager& serial_manager)
|
void AP_Mount_Alexmos::init(const AP_SerialManager& serial_manager)
|
||||||
{
|
{
|
||||||
// check for alexmos protcol
|
// check for alexmos protcol
|
||||||
if ((_port = serial_manager.find_serial(AP_SerialManager::SerialProtocol_AlexMos))) {
|
if ((_port = serial_manager.find_serial(AP_SerialManager::SerialProtocol_AlexMos, 0))) {
|
||||||
_initialised = true;
|
_initialised = true;
|
||||||
get_boardinfo();
|
get_boardinfo();
|
||||||
read_params(0); //we request parameters for profile 0 and therfore get global and profile parameters
|
read_params(0); //we request parameters for profile 0 and therfore get global and profile parameters
|
||||||
|
@ -17,7 +17,7 @@ AP_Mount_SToRM32::AP_Mount_SToRM32(AP_Mount &frontend, AP_Mount::mount_state &st
|
|||||||
void AP_Mount_SToRM32::init(const AP_SerialManager& serial_manager)
|
void AP_Mount_SToRM32::init(const AP_SerialManager& serial_manager)
|
||||||
{
|
{
|
||||||
// get_mavlink_channel for MAVLink2
|
// get_mavlink_channel for MAVLink2
|
||||||
if (serial_manager.get_mavlink_channel(AP_SerialManager::SerialProtocol_MAVLink2, _chan)) {
|
if (serial_manager.get_mavlink_channel(AP_SerialManager::SerialProtocol_MAVLink, 1, _chan)) {
|
||||||
_initialised = true;
|
_initialised = true;
|
||||||
set_mode((enum MAV_MOUNT_MODE)_state._default_mode.get());
|
set_mode((enum MAV_MOUNT_MODE)_state._default_mode.get());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user