AP_Scripting: rangefinder singleton requires AP_RANGEFINDER_ENABLED

.... or HAL_PERIPH_ENABLE_RANGEFINDER
This commit is contained in:
Peter Barker authored and Andrew Tridgell committed 2024-07-02 09:17:26 +10:00
1 parent 118f3b41ac
commit e88d76d72d
2 files changed
+8 -5

No files matched your search

+2 -2
View File
@@ -1067,7 +1067,7 @@ int lua_print(lua_State *L) {
return 0;
}
#if (!defined(HAL_BUILD_AP_PERIPH) || defined(HAL_PERIPH_ENABLE_RANGEFINDER))
#if AP_RANGEFINDER_ENABLED
int lua_range_finder_handle_script_msg(lua_State *L) {
// Arg 1 => self (an instance of rangefinder_backend)
// Arg 2 => a float distance or a RangeFinder_State user data
@@ -1091,7 +1091,7 @@ int lua_range_finder_handle_script_msg(lua_State *L) {
lua_pushboolean(L, result);
return 1;
}
#endif
#endif // AP_RANGEFINDER_ENABLED
/*
lua wants to abort, and doesn't have access to a panic function