From e55799c8d82417183cd4f7a4a5dc97078e0a1424 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 26 Oct 2023 16:34:11 +1100 Subject: [PATCH] AP_RangeFinder: correct use of AP_RANGEFINDER_LUA_ENABLED new, separate define to AP_SCRIPTING_ENABLED use was incomplete --- libraries/AP_RangeFinder/AP_RangeFinder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_RangeFinder/AP_RangeFinder.cpp b/libraries/AP_RangeFinder/AP_RangeFinder.cpp index 646011b373..425ae116d7 100644 --- a/libraries/AP_RangeFinder/AP_RangeFinder.cpp +++ b/libraries/AP_RangeFinder/AP_RangeFinder.cpp @@ -536,7 +536,7 @@ void RangeFinder::detect_instance(uint8_t instance, uint8_t& serial_instance) break; case Type::Lua_Scripting: -#if AP_SCRIPTING_ENABLED +#if AP_RANGEFINDER_LUA_ENABLED _add_backend(new AP_RangeFinder_Lua(state[instance], params[instance]), instance); #endif break;