From f8e49e54385cdb26709db6f593415868fecceac3 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Mon, 11 Feb 2019 14:49:40 +0900 Subject: [PATCH] GCS_MAVLink: call send_esc_telemetry for AP_ToshibaCAN ESCs --- libraries/GCS_MAVLink/GCS_Common.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/libraries/GCS_MAVLink/GCS_Common.cpp b/libraries/GCS_MAVLink/GCS_Common.cpp index 3eb5d6f2dd..f719402453 100644 --- a/libraries/GCS_MAVLink/GCS_Common.cpp +++ b/libraries/GCS_MAVLink/GCS_Common.cpp @@ -47,6 +47,7 @@ #if APM_BUILD_TYPE(APM_BUILD_ArduCopter) || APM_BUILD_TYPE(APM_BUILD_ArduPlane) || APM_BUILD_TYPE(APM_BUILD_ArduSub) #include #endif + #include #endif extern const AP_HAL::HAL& hal; @@ -4125,8 +4126,15 @@ bool GCS_MAVLINK::try_send_message(const enum ap_message id) if (ap_kdecan != nullptr) { ap_kdecan->send_mavlink(uint8_t(chan)); } - break; #endif + break; + } + case AP_BoardConfig_CAN::Protocol_Type_ToshibaCAN: { + AP_ToshibaCAN *ap_tcan = AP_ToshibaCAN::get_tcan(i); + if (ap_tcan != nullptr) { + ap_tcan->send_esc_telemetry_mavlink(uint8_t(chan)); + } + break; } case AP_BoardConfig_CAN::Protocol_Type_UAVCAN: case AP_BoardConfig_CAN::Protocol_Type_None: