From f4409066bc153cc75e4c464151c47394ba56b36e Mon Sep 17 00:00:00 2001 From: "Dr.-Ing. Amilcar do Carmo Lucas" Date: Fri, 16 Apr 2021 20:11:19 +0200 Subject: [PATCH] AP_KDECAN: fix compilation when HAL_WITH_ESC_TELEM == 0 --- libraries/AP_KDECAN/AP_KDECAN.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/AP_KDECAN/AP_KDECAN.cpp b/libraries/AP_KDECAN/AP_KDECAN.cpp index 48e1cd3f0c..6928e00a4c 100644 --- a/libraries/AP_KDECAN/AP_KDECAN.cpp +++ b/libraries/AP_KDECAN/AP_KDECAN.cpp @@ -437,6 +437,7 @@ void AP_KDECAN::loop() int16_t res = _can_iface->receive(frame, rx_time, flags); if (res == 1) { +#if HAL_WITH_ESC_TELEM frame_id_t id { .value = frame.id & AP_HAL::CANFrame::MaskExtID }; // check if frame is valid: directed at autopilot, doesn't come from broadcast and ESC was detected before @@ -470,6 +471,7 @@ void AP_KDECAN::loop() break; } } +#endif // HAL_WITH_ESC_TELEM } }