AP_Winch: correct compilation when backends compiled out

This commit is contained in:
Peter Barker 2024-08-08 21:43:56 +10:00 committed by Peter Barker
parent 27a7a21805
commit 748fe538ea
1 changed files with 4 additions and 0 deletions

View File

@ -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;
}