Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust includes to help prevent loops #28193

Merged
merged 4 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions libraries/AP_Filesystem/AP_Filesystem_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

#include <AP_HAL/AP_HAL_Boards.h>

#include <AP_Mission/AP_Mission_config.h>

// backends:

#ifndef AP_FILESYSTEM_ESP32_ENABLED
Expand All @@ -14,10 +12,6 @@
#define AP_FILESYSTEM_FATFS_ENABLED HAL_OS_FATFS_IO
#endif

#ifndef AP_FILESYSTEM_MISSION_ENABLED
#define AP_FILESYSTEM_MISSION_ENABLED AP_MISSION_ENABLED
#endif

#ifndef AP_FILESYSTEM_PARAM_ENABLED
#define AP_FILESYSTEM_PARAM_ENABLED 1
#endif
Expand Down Expand Up @@ -62,3 +56,8 @@
#ifndef AP_FILESYSTEM_HAVE_DIRENT_DTYPE
#define AP_FILESYSTEM_HAVE_DIRENT_DTYPE 1
#endif

#ifndef AP_FILESYSTEM_MISSION_ENABLED
#include <AP_Mission/AP_Mission_config.h>
#define AP_FILESYSTEM_MISSION_ENABLED AP_MISSION_ENABLED
#endif
2 changes: 1 addition & 1 deletion libraries/AP_Mount/AP_Mount_config.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <AP_HAL/AP_HAL_Boards.h>
#include <AP_Terrain/AP_Terrain.h>
#include <AP_Terrain/AP_Terrain_config.h>

#ifndef HAL_MOUNT_ENABLED
#define HAL_MOUNT_ENABLED 1
Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_SerialManager/AP_SerialManager_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
#pragma once

#include <AP_HAL/AP_HAL.h>
#include <AP_HAL/AP_HAL_Boards.h>
#include <AP_Networking/AP_Networking_Config.h>
#include <AP_InertialSensor/AP_InertialSensor_config.h>

Expand Down
7 changes: 1 addition & 6 deletions libraries/AP_Terrain/AP_Terrain.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@
*/
#pragma once

#include <AP_HAL/AP_HAL_Boards.h>
#include <AP_Filesystem/AP_Filesystem_config.h>

#ifndef AP_TERRAIN_AVAILABLE
#define AP_TERRAIN_AVAILABLE AP_FILESYSTEM_FILE_READING_ENABLED
#endif
#include "AP_Terrain_config.h"

#if AP_TERRAIN_AVAILABLE

Expand Down
8 changes: 8 additions & 0 deletions libraries/AP_Terrain/AP_Terrain_config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#pragma once

#include <AP_HAL/AP_HAL_Boards.h>
#include <AP_Filesystem/AP_Filesystem_config.h>

#ifndef AP_TERRAIN_AVAILABLE
#define AP_TERRAIN_AVAILABLE AP_FILESYSTEM_FILE_READING_ENABLED
#endif
Loading