AP_Rally: allow more libraries to compile with no HAL_GCS_ENABLED

This commit is contained in:
Peter Barker 2023-09-02 15:21:35 +10:00 committed by Peter Barker
parent ba96789b70
commit 9654f282da
3 changed files with 17 additions and 7 deletions

View File

@ -1,5 +1,7 @@
/// @file AP_Rally.h
/// @brief Handles rally point storage and retrieval.
#include "AP_Rally_config.h"
#if HAL_RALLY_ENABLED
#include "AP_Rally.h"
#include <AP_AHRS/AP_AHRS.h>
@ -7,7 +9,6 @@
#include <StorageManager/StorageManager.h>
#include <AP_Vehicle/AP_Vehicle_Type.h>
#if HAL_RALLY_ENABLED
// storage object
StorageAccess AP_Rally::_storage(StorageManager::StorageRally);

View File

@ -14,11 +14,11 @@
*/
#pragma once
#include <AP_HAL/AP_HAL_Boards.h>
#include "AP_Rally_config.h"
#ifndef HAL_RALLY_ENABLED
#define HAL_RALLY_ENABLED 1
#endif
#if HAL_RALLY_ENABLED
#include <AP_HAL/AP_HAL_Boards.h>
#include <AP_Common/AP_Common.h>
#include <AP_Common/Location.h>
@ -98,3 +98,5 @@ private:
namespace AP {
AP_Rally *rally();
};
#endif // HAL_RALLY_ENABLED

View File

@ -0,0 +1,7 @@
#pragma once
#include <AP_HAL/AP_HAL_Boards.h>
#ifndef HAL_RALLY_ENABLED
#define HAL_RALLY_ENABLED 1
#endif