Mount: integrate Serial Manager instance

This commit is contained in:
Randy Mackay 2015-03-27 18:46:58 -07:00
parent cbcd32d698
commit 1ed7737669
2 changed files with 2 additions and 2 deletions

View File

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

View File

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