From b0f7f84f4f2f0243e7b98d2cfdfe0a3236a4bfee Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 14 Dec 2023 10:20:16 +1100 Subject: [PATCH] AP_Rally: add ASSERT_STORAGE_SIZE macro saves havin gto name the dummy variable yourself --- libraries/AP_Rally/AP_Rally.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_Rally/AP_Rally.cpp b/libraries/AP_Rally/AP_Rally.cpp index eb112d1c81e..e2883152074 100644 --- a/libraries/AP_Rally/AP_Rally.cpp +++ b/libraries/AP_Rally/AP_Rally.cpp @@ -12,8 +12,6 @@ // storage object StorageAccess AP_Rally::_storage(StorageManager::StorageRally); -assert_storage_size _assert_storage_size_RallyLocation; - #if APM_BUILD_COPTER_OR_HELI #define RALLY_LIMIT_KM_DEFAULT 0.3f #define RALLY_INCLUDE_HOME_DEFAULT 1 @@ -56,6 +54,8 @@ const AP_Param::GroupInfo AP_Rally::var_info[] = { // constructor AP_Rally::AP_Rally() { + ASSERT_STORAGE_SIZE(RallyLocation, 15); + #if CONFIG_HAL_BOARD == HAL_BOARD_SITL if (_singleton != nullptr) { AP_HAL::panic("Rally must be singleton");