Skip to content

Commit cef8bce

Browse files
shiv-tyagipeterbarker
authored andcommitted
AP_HAL_ChibiOS: wrap define AP_XX_ENABLED AP_PERIPH_YY_ENABLED inside ifndef-endif
We should be only defining these if they are already not defined.
1 parent 78d42fc commit cef8bce

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

libraries/AP_HAL_ChibiOS/hwdef/scripts/defaults_periph.h

+6
Original file line numberDiff line numberDiff line change
@@ -360,12 +360,18 @@
360360
#define AP_AHRS_ENABLED AP_PERIPH_AHRS_ENABLED
361361
#define AP_COMPASS_ENABLED AP_PERIPH_MAG_ENABLED
362362
#define AP_BARO_ENABLED AP_PERIPH_BARO_ENABLED
363+
#ifndef AP_RANGEFINDER_ENABLED
363364
#define AP_RANGEFINDER_ENABLED AP_PERIPH_RANGEFINDER_ENABLED
365+
#endif
364366
#define AP_INERTIALSENSOR_ENABLED AP_PERIPH_IMU_ENABLED
365367
#define AP_INERTIALSENSOR_ALLOW_NO_SENSORS AP_PERIPH_IMU_ENABLED
366368
#define AP_RTC_ENABLED AP_PERIPH_RTC_ENABLED
369+
#ifndef AP_RCPROTOCOL_ENABLED
367370
#define AP_RCPROTOCOL_ENABLED AP_PERIPH_RCIN_ENABLED
371+
#endif
372+
#ifndef AP_RPM_ENABLED
368373
#define AP_RPM_ENABLED AP_PERIPH_RPM_ENABLED
374+
#endif
369375

370376
/*
371377
* GPS Backends - we selectively turn backends on.

0 commit comments

Comments
 (0)