Browse Source

Mount: integrate Serial Manager instance

master
Randy Mackay 10 years ago
parent
commit
1ed7737669
  1. 2
      libraries/AP_Mount/AP_Mount_Alexmos.cpp
  2. 2
      libraries/AP_Mount/AP_Mount_SToRM32.cpp

2
libraries/AP_Mount/AP_Mount_Alexmos.cpp

@ -6,7 +6,7 @@ extern const AP_HAL::HAL& hal; @@ -6,7 +6,7 @@ extern const AP_HAL::HAL& hal;
void AP_Mount_Alexmos::init(const AP_SerialManager& serial_manager)
{
// 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;
get_boardinfo();
read_params(0); //we request parameters for profile 0 and therfore get global and profile parameters

2
libraries/AP_Mount/AP_Mount_SToRM32.cpp

@ -17,7 +17,7 @@ AP_Mount_SToRM32::AP_Mount_SToRM32(AP_Mount &frontend, AP_Mount::mount_state &st @@ -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)
{
// 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;
set_mode((enum MAV_MOUNT_MODE)_state._default_mode.get());
}

Loading…
Cancel
Save