From 7ed8dd13e28226022f29b06821d530ecfad84d75 Mon Sep 17 00:00:00 2001 From: Jukka Laitinen Date: Fri, 5 Apr 2024 14:22:47 +0300 Subject: [PATCH] platforms/nuttx/src/px4/common/cdc_acm_check.cpp: Fix to compile even if reset is not supported Signed-off-by: Jukka Laitinen --- platforms/nuttx/src/px4/common/cdc_acm_check.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platforms/nuttx/src/px4/common/cdc_acm_check.cpp b/platforms/nuttx/src/px4/common/cdc_acm_check.cpp index c9bcbcf49afd..6127c5ae84de 100644 --- a/platforms/nuttx/src/px4/common/cdc_acm_check.cpp +++ b/platforms/nuttx/src/px4/common/cdc_acm_check.cpp @@ -216,7 +216,9 @@ static void mavlink_usb_check(void *arg) if (param1 == 1) { // 1: Reboot autopilot +#if defined(CONFIG_BOARDCTL_RESET) px4_reboot_request(false, 0); +#endif } else if (param1 == 2) { // 2: Shutdown autopilot @@ -226,7 +228,9 @@ static void mavlink_usb_check(void *arg) } else if (param1 == 3) { // 3: Reboot autopilot and keep it in the bootloader until upgraded. +#if defined(CONFIG_BOARDCTL_RESET) px4_reboot_request(true, 0); +#endif } } }