Skip to content

Commit c1930ae

Browse files
committed
x
1 parent 9a48aa7 commit c1930ae

File tree

4 files changed

+20
-15
lines changed

4 files changed

+20
-15
lines changed

libraries/AP_IBUS2/AP_IBUS2.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,7 @@
2929

3030
#pragma once
3131

32-
#include <AP_HAL/AP_HAL_Boards.h>
33-
34-
#ifndef AP_IBUS2_ENABLED
35-
#define AP_IBUS2_ENABLED (HAL_PROGRAM_SIZE_LIMIT_KB > 2048)
36-
#endif
32+
#include "AP_IBUS2_config.h"
3733

3834
#if AP_IBUS2_ENABLED
3935

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#pragma once
2+
3+
#include <AP_HAL/AP_HAL_Boards.h>
4+
5+
#ifndef AP_IBUS2_ENABLED
6+
#define AP_IBUS2_ENABLED (HAL_PROGRAM_SIZE_LIMIT_KB > 2048)
7+
#endif
8+
9+
#ifndef AP_IBUS2_MASTER_ENABLED
10+
#define AP_IBUS2_MASTER_ENABLED AP_IBUS2_ENABLED
11+
#endif
12+
13+
#ifndef AP_IBUS2_SLAVE_ENABLED
14+
#define AP_IBUS2_SLAVE_ENABLED AP_IBUS2_ENABLED
15+
#endif

libraries/AP_IBUS2_Master/AP_IBUS2_Master.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,11 @@
3333

3434
#pragma once
3535

36-
#include <AP_IBUS2/AP_IBUS2.h>
37-
38-
#ifndef AP_IBUS2_MASTER_ENABLED
39-
#define AP_IBUS2_MASTER_ENABLED AP_IBUS2_ENABLED
40-
#endif
36+
#include <AP_IBUS2/AP_IBUS2_config.h>
4137

4238
#if AP_IBUS2_MASTER_ENABLED
4339

40+
#include <AP_IBUS2/AP_IBUS2.h>
4441
#include <AP_HAL/AP_HAL.h>
4542
#include <AP_Param/AP_Param.h>
4643
#include <AP_SerialManager/AP_SerialManager.h>

libraries/AP_IBUS2_Slave/AP_IBUS2_Slave.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,11 @@
3535

3636
#pragma once
3737

38-
#include <AP_IBUS2/AP_IBUS2.h>
39-
40-
#ifndef AP_IBUS2_SLAVE_ENABLED
41-
#define AP_IBUS2_SLAVE_ENABLED AP_IBUS2_ENABLED
42-
#endif
38+
#include <AP_IBUS2/AP_IBUS2_config.h>
4339

4440
#if AP_IBUS2_SLAVE_ENABLED
4541

42+
#include <AP_IBUS2/AP_IBUS2.h>
4643
#include <AP_HAL/AP_HAL.h>
4744
#include <AP_Param/AP_Param.h>
4845
#include <AP_SerialManager/AP_SerialManager.h>

0 commit comments

Comments
 (0)