Rover: add support for 4th mavlink channel

This commit is contained in:
Randy Mackay 2015-05-15 13:24:59 +09:00
parent 174c55b0af
commit 757f388d62
3 changed files with 12 additions and 0 deletions

View File

@ -71,6 +71,7 @@ public:
k_param_serial2_protocol, // deprecated, can be deleted k_param_serial2_protocol, // deprecated, can be deleted
k_param_serial_manager, // serial manager library k_param_serial_manager, // serial manager library
k_param_cli_enabled, k_param_cli_enabled,
k_param_gcs3,
// //
// 130: Sensor parameters // 130: Sensor parameters

View File

@ -455,6 +455,12 @@ const AP_Param::Info var_info[] PROGMEM = {
GOBJECTN(gcs[2], gcs2, "SR2_", GCS_MAVLINK), GOBJECTN(gcs[2], gcs2, "SR2_", GCS_MAVLINK),
#endif #endif
#if MAVLINK_COMM_NUM_BUFFERS > 3
// @Group: SR3_
// @Path: GCS_Mavlink.pde
GOBJECTN(gcs[3], gcs3, "SR3_", GCS_MAVLINK),
#endif
// @Group: SERIAL // @Group: SERIAL
// @Path: ../libraries/AP_SerialManager/AP_SerialManager.cpp // @Path: ../libraries/AP_SerialManager/AP_SerialManager.cpp
GOBJECT(serial_manager, "SERIAL", AP_SerialManager), GOBJECT(serial_manager, "SERIAL", AP_SerialManager),

View File

@ -118,6 +118,11 @@ static void init_ardupilot()
gcs[2].setup_uart(serial_manager, AP_SerialManager::SerialProtocol_MAVLink, 1); gcs[2].setup_uart(serial_manager, AP_SerialManager::SerialProtocol_MAVLink, 1);
#endif #endif
#if MAVLINK_COMM_NUM_BUFFERS > 3
// setup serial port for fourth telemetry port (not used by default)
gcs[3].setup_uart(serial_manager, AP_SerialManager::SerialProtocol_MAVLink, 2);
#endif
// setup frsky telemetry // setup frsky telemetry
#if FRSKY_TELEM_ENABLED == ENABLED #if FRSKY_TELEM_ENABLED == ENABLED
frsky_telemetry.init(serial_manager); frsky_telemetry.init(serial_manager);