From 174c55b0afcaf22bbda02b483c2e31b20b380057 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Fri, 15 May 2015 13:24:39 +0900 Subject: [PATCH] Plane: add support for 4th mavlink channel --- ArduPlane/Parameters.h | 1 + ArduPlane/Parameters.pde | 6 ++++++ ArduPlane/system.pde | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/ArduPlane/Parameters.h b/ArduPlane/Parameters.h index 6e99f5b1a9..ce20437e8d 100644 --- a/ArduPlane/Parameters.h +++ b/ArduPlane/Parameters.h @@ -137,6 +137,7 @@ public: k_param_land_disarm_delay, k_param_glide_slope_threshold, k_param_rudder_only, + k_param_gcs3, // 93 // 100: Arming parameters k_param_arming = 100, diff --git a/ArduPlane/Parameters.pde b/ArduPlane/Parameters.pde index eda3a68107..c7c289ebfa 100644 --- a/ArduPlane/Parameters.pde +++ b/ArduPlane/Parameters.pde @@ -1110,6 +1110,12 @@ const AP_Param::Info var_info[] PROGMEM = { GOBJECTN(gcs[2], gcs2, "SR2_", GCS_MAVLINK), #endif +#if MAVLINK_COMM_NUM_BUFFERS > 3 + // @Group: SR3_ + // @Path: GCS_Mavlink.pde + GOBJECTN(gcs[3], gcs3, "SR3_", GCS_MAVLINK), +#endif + // @Group: INS_ // @Path: ../libraries/AP_InertialSensor/AP_InertialSensor.cpp GOBJECT(ins, "INS_", AP_InertialSensor), diff --git a/ArduPlane/system.pde b/ArduPlane/system.pde index 73fefb802d..74a7339020 100644 --- a/ArduPlane/system.pde +++ b/ArduPlane/system.pde @@ -135,6 +135,11 @@ static void init_ardupilot() gcs[2].setup_uart(serial_manager, AP_SerialManager::SerialProtocol_MAVLink, 1); #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 #if FRSKY_TELEM_ENABLED == ENABLED frsky_telemetry.init(serial_manager);