From ab01ec604096e3d922753fdf34ac55fd6f6a1502 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 8 Aug 2024 21:43:56 +1000 Subject: [PATCH] AP_Winch: correct compilation when backends compiled out --- libraries/AP_Winch/AP_Winch.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/AP_Winch/AP_Winch.cpp b/libraries/AP_Winch/AP_Winch.cpp index 75ef73fdfe0b39..613679ceec5f7f 100644 --- a/libraries/AP_Winch/AP_Winch.cpp +++ b/libraries/AP_Winch/AP_Winch.cpp @@ -78,12 +78,16 @@ void AP_Winch::init() switch ((WinchType)config.type.get()) { case WinchType::NONE: break; +#if AP_WINCH_PWM_ENABLED case WinchType::PWM: backend = NEW_NOTHROW AP_Winch_PWM(config); break; +#endif +#if AP_WINCH_DAIWA_ENABLED case WinchType::DAIWA: backend = NEW_NOTHROW AP_Winch_Daiwa(config); break; +#endif default: break; }