diff --git a/conf/autopilot/rotorcraft.makefile b/conf/autopilot/rotorcraft.makefile index 9df8917d4f..00123dcd40 100644 --- a/conf/autopilot/rotorcraft.makefile +++ b/conf/autopilot/rotorcraft.makefile @@ -142,15 +142,16 @@ ap.srcs += $(SRC_FIRMWARE)/commands.c # ap.srcs += $(SRC_BOARD)/baro_board.c ifeq ($(BOARD), booz) -ap.CFLAGS += -DROTORCRAFT_BARO_LED=$(BARO_LED) else ifeq ($(BOARD), lisa_l) ap.CFLAGS += -DUSE_I2C2 else ifeq ($(BOARD), navgo) -ap.CFLAGS += -DROTORCRAFT_BARO_LED=$(BARO_LED) ap.CFLAGS += -DUSE_I2C1 ap.CFLAGS += -DADS1114_I2C_DEVICE=i2c1 ap.srcs += peripherals/ads1114.c endif +ifneq ($(BARO_LED),none) +ap.CFLAGS += -DROTORCRAFT_BARO_LED=$(BARO_LED) +endif # # Analog Backend diff --git a/conf/autopilot/subsystems/fixedwing/ahrs_float_cmpl_rmat.makefile b/conf/autopilot/subsystems/fixedwing/ahrs_float_cmpl_rmat.makefile index 566783b84d..2783f15fc1 100644 --- a/conf/autopilot/subsystems/fixedwing/ahrs_float_cmpl_rmat.makefile +++ b/conf/autopilot/subsystems/fixedwing/ahrs_float_cmpl_rmat.makefile @@ -9,8 +9,8 @@ AHRS_CFLAGS = -DUSE_AHRS -DAHRS_UPDATE_FW_ESTIMATOR AHRS_CFLAGS += -DUSE_AHRS_ALIGNER -DAHRS_GRAVITY_UPDATE_COORDINATED_TURN -ifdef AHRS_ALIGNER_LED -AHRS_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED) +ifneq ($(AHRS_ALIGNER_LED),none) + AHRS_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED) endif AHRS_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_float_cmpl_rmat.h\" AHRS_SRCS += subsystems/ahrs.c diff --git a/conf/autopilot/subsystems/fixedwing/ahrs_float_dcm.makefile b/conf/autopilot/subsystems/fixedwing/ahrs_float_dcm.makefile index fbed2f257e..0a7e44b0f5 100644 --- a/conf/autopilot/subsystems/fixedwing/ahrs_float_dcm.makefile +++ b/conf/autopilot/subsystems/fixedwing/ahrs_float_dcm.makefile @@ -13,7 +13,8 @@ ap.srcs += $(SRC_SUBSYSTEMS)/ahrs.c ap.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_aligner.c ap.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_float_dcm.c -ifdef AHRS_ALIGNER_LED + +ifneq ($(AHRS_ALIGNER_LED),none) ap.CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED) endif diff --git a/conf/autopilot/subsystems/fixedwing/ahrs_int_cmpl_euler.makefile b/conf/autopilot/subsystems/fixedwing/ahrs_int_cmpl_euler.makefile index 3393992def..456d93eddc 100644 --- a/conf/autopilot/subsystems/fixedwing/ahrs_int_cmpl_euler.makefile +++ b/conf/autopilot/subsystems/fixedwing/ahrs_int_cmpl_euler.makefile @@ -6,8 +6,8 @@ AHRS_CFLAGS = -DUSE_AHRS -DAHRS_UPDATE_FW_ESTIMATOR -DUSE_AHRS_CMPL AHRS_CFLAGS += -DUSE_AHRS_ALIGNER -ifdef AHRS_ALIGNER_LED -AHRS_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED) +ifneq ($(AHRS_ALIGNER_LED),none) + AHRS_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED) endif AHRS_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_int_cmpl_euler.h\" AHRS_SRCS += subsystems/ahrs.c diff --git a/conf/autopilot/subsystems/fixedwing/ahrs_int_cmpl_quat.makefile b/conf/autopilot/subsystems/fixedwing/ahrs_int_cmpl_quat.makefile index 5e401b6ad7..0c44fdaab0 100644 --- a/conf/autopilot/subsystems/fixedwing/ahrs_int_cmpl_quat.makefile +++ b/conf/autopilot/subsystems/fixedwing/ahrs_int_cmpl_quat.makefile @@ -9,8 +9,8 @@ AHRS_CFLAGS = -DUSE_AHRS -DAHRS_UPDATE_FW_ESTIMATOR AHRS_CFLAGS += -DUSE_AHRS_ALIGNER -DAHRS_GRAVITY_UPDATE_COORDINATED_TURN -ifdef AHRS_ALIGNER_LED -AHRS_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED) +ifneq ($(AHRS_ALIGNER_LED),none) + AHRS_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED) endif AHRS_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_int_cmpl.h\" AHRS_SRCS += subsystems/ahrs.c diff --git a/conf/autopilot/subsystems/fixedwing/autopilot.makefile b/conf/autopilot/subsystems/fixedwing/autopilot.makefile index 5408c7fe21..50429bafb6 100644 --- a/conf/autopilot/subsystems/fixedwing/autopilot.makefile +++ b/conf/autopilot/subsystems/fixedwing/autopilot.makefile @@ -123,9 +123,7 @@ ifeq ($(ARCH), stm32) ifneq ($(SYS_TIME_LED),none) ns_CFLAGS += -DSYS_TIME_LED=$(SYS_TIME_LED) endif -else - ns_CFLAGS += -DTIME_LED=1 -endif + # # Sys-time diff --git a/conf/autopilot/subsystems/lisa_passthrough/ahrs_cmpl.makefile b/conf/autopilot/subsystems/lisa_passthrough/ahrs_cmpl.makefile index 423f48203e..c1120f52db 100644 --- a/conf/autopilot/subsystems/lisa_passthrough/ahrs_cmpl.makefile +++ b/conf/autopilot/subsystems/lisa_passthrough/ahrs_cmpl.makefile @@ -2,7 +2,10 @@ # Complementary filter for attitude estimation # -ap.CFLAGS += -DUSE_AHRS_CMPL -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED) +stm_passthrough.CFLAGS += -DUSE_AHRS_CMPL +ifneq ($(AHRS_ALIGNER_LED),none) + stm_passthrough.CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED) +endif stm_passthrough.srcs += $(SRC_SUBSYSTEMS)/ahrs.c stm_passthrough.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_aligner.c stm_passthrough.srcs += $(SRC_SUBSYSTEMS)/ahrs/ahrs_int_cmpl_euler.c diff --git a/conf/autopilot/subsystems/rotorcraft/ahrs_float_cmpl_rmat.makefile b/conf/autopilot/subsystems/rotorcraft/ahrs_float_cmpl_rmat.makefile index f3863422f5..521ae93194 100644 --- a/conf/autopilot/subsystems/rotorcraft/ahrs_float_cmpl_rmat.makefile +++ b/conf/autopilot/subsystems/rotorcraft/ahrs_float_cmpl_rmat.makefile @@ -8,8 +8,8 @@ AHRS_CFLAGS = -DUSE_AHRS AHRS_CFLAGS += -DUSE_AHRS_ALIGNER -ifdef AHRS_ALIGNER_LED -AHRS_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED) +ifneq ($(AHRS_ALIGNER_LED),none) + AHRS_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED) endif AHRS_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_float_cmpl_rmat.h\" AHRS_SRCS += subsystems/ahrs.c diff --git a/conf/autopilot/subsystems/rotorcraft/ahrs_int_cmpl_euler.makefile b/conf/autopilot/subsystems/rotorcraft/ahrs_int_cmpl_euler.makefile index a2d817dc86..40ae37da45 100644 --- a/conf/autopilot/subsystems/rotorcraft/ahrs_int_cmpl_euler.makefile +++ b/conf/autopilot/subsystems/rotorcraft/ahrs_int_cmpl_euler.makefile @@ -5,8 +5,8 @@ AHRS_CFLAGS = -DUSE_AHRS -DUSE_AHRS_CMPL AHRS_CFLAGS += -DUSE_AHRS_ALIGNER -ifdef AHRS_ALIGNER_LED -AHRS_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED) +ifneq ($(AHRS_ALIGNER_LED),none) + AHRS_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED) endif AHRS_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_int_cmpl_euler.h\" AHRS_SRCS += subsystems/ahrs.c diff --git a/conf/autopilot/subsystems/rotorcraft/ahrs_int_cmpl_quat.makefile b/conf/autopilot/subsystems/rotorcraft/ahrs_int_cmpl_quat.makefile index 1eb08fc6ac..2f316c9ed0 100644 --- a/conf/autopilot/subsystems/rotorcraft/ahrs_int_cmpl_quat.makefile +++ b/conf/autopilot/subsystems/rotorcraft/ahrs_int_cmpl_quat.makefile @@ -8,8 +8,8 @@ AHRS_CFLAGS = -DUSE_AHRS AHRS_CFLAGS += -DUSE_AHRS_ALIGNER -ifdef AHRS_ALIGNER_LED -AHRS_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED) +ifneq ($(AHRS_ALIGNER_LED),none) + AHRS_CFLAGS += -DAHRS_ALIGNER_LED=$(AHRS_ALIGNER_LED) endif AHRS_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_int_cmpl.h\" AHRS_SRCS += subsystems/ahrs.c diff --git a/conf/boards/booz_1.0.makefile b/conf/boards/booz_1.0.makefile index cec7e5fd7a..900f2f6079 100644 --- a/conf/boards/booz_1.0.makefile +++ b/conf/boards/booz_1.0.makefile @@ -18,14 +18,31 @@ endif # # -ifndef SYS_TIME_LED -SYS_TIME_LED = 1 # not used on rotorcraft, only for tests +# +# default LED configuration +# +ifndef RADIO_CONTROL_LED +RADIO_CONTROL_LED = 1 +endif + +ifndef BARO_LED +BARO_LED = 2 +endif + +ifndef AHRS_ALIGNER_LED +AHRS_ALIGNER_LED = 3 +endif + +ifndef GPS_LED +GPS_LED = 4 +endif + +ifndef SYS_TIME_LED +SYS_TIME_LED = 1 endif -RADIO_CONTROL_LED = 1 RADIO_CONTROL_LINK = UART0 -BARO_LED = 2 ifndef MODEM_PORT MODEM_PORT = UART1 @@ -34,12 +51,9 @@ ifndef MODEM_BAUD MODEM_BAUD = B57600 endif -AHRS_ALIGNER_LED = 3 - ifndef GPS_PORT GPS_PORT=UART0 endif ifndef GPS_BAUD GPS_BAUD=B38400 endif -GPS_LED=4 diff --git a/conf/boards/hb_1.1.makefile b/conf/boards/hb_1.1.makefile index 5854476346..1b60e422ba 100644 --- a/conf/boards/hb_1.1.makefile +++ b/conf/boards/hb_1.1.makefile @@ -18,8 +18,27 @@ endif # # +# +# default LED configuration +# +ifndef RADIO_CONTROL_LED +RADIO_CONTROL_LED = none +endif + +ifndef BARO_LED +BARO_LED = none +endif + +ifndef AHRS_ALIGNER_LED +AHRS_ALIGNER_LED = none +endif + +ifndef GPS_LED +GPS_LED = 2 +endif + ifndef SYS_TIME_LED -SYS_TIME_LED = 1 # not used on rotorcraft, only for tests +SYS_TIME_LED = 1 endif RADIO_CONTROL_LINK = UART0 @@ -38,9 +57,6 @@ ifndef GPS_BAUD GPS_BAUD = B38400 endif -GPS_LED = 2 -RADIO_CONTROL_LED = none - ifndef ADC_IR1 ADC_IR1 = 1 ADC_IR1_CHAN = 0 diff --git a/conf/boards/lisa_l_1.0.makefile b/conf/boards/lisa_l_1.0.makefile index 68e4304f8b..d5ebd0ba1f 100644 --- a/conf/boards/lisa_l_1.0.makefile +++ b/conf/boards/lisa_l_1.0.makefile @@ -36,13 +36,31 @@ endif # # +# +# default LED configuration +# +ifndef RADIO_CONTROL_LED +RADIO_CONTROL_LED = 5 +endif + +ifndef BARO_LED +BARO_LED = none +endif + +ifndef AHRS_ALIGNER_LED +AHRS_ALIGNER_LED = 7 +endif + +ifndef GPS_LED +GPS_LED = 3 +endif + ifndef SYS_TIME_LED SYS_TIME_LED = 1 endif RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT = UART3 RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT = UART5 -RADIO_CONTROL_LED = 5 ifndef MODEM_PORT MODEM_PORT=UART2 @@ -51,15 +69,12 @@ ifndef MODEM_BAUD MODEM_BAUD=B57600 endif -AHRS_ALIGNER_LED = 7 - ifndef GPS_PORT GPS_PORT=UART1 endif ifndef GPS_BAUD GPS_BAUD=B38400 endif -GPS_LED = 3 # # this is the DRDY pin of a max1168 on a booz IMU diff --git a/conf/boards/lisa_m_1.0.makefile b/conf/boards/lisa_m_1.0.makefile index 422655dc5a..c10f49f2cd 100644 --- a/conf/boards/lisa_m_1.0.makefile +++ b/conf/boards/lisa_m_1.0.makefile @@ -27,13 +27,33 @@ endif # # + +# +# default LED configuration +# +ifndef RADIO_CONTROL_LED +RADIO_CONTROL_LED = none +endif + +ifndef BARO_LED +BARO_LED = none +endif + +ifndef AHRS_ALIGNER_LED +AHRS_ALIGNER_LED = none +endif + +ifndef GPS_LED +GPS_LED = none +endif + ifndef SYS_TIME_LED SYS_TIME_LED = 1 endif + RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT = UART3 RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT = UART5 -RADIO_CONTROL_LED = none ifndef MODEM_PORT MODEM_PORT=UART2 @@ -42,7 +62,6 @@ ifndef MODEM_BAUD MODEM_BAUD=B57600 endif -#AHRS_ALIGNER_LED = 7 ifndef GPS_PORT GPS_PORT=UART1 @@ -50,7 +69,7 @@ endif ifndef GPS_BAUD GPS_BAUD=B38400 endif -GPS_LED = none + # # this is the DRDY pin of a max1168 on a booz IMU diff --git a/conf/boards/navgo_1.0.makefile b/conf/boards/navgo_1.0.makefile index de88250efd..75b42e53f4 100644 --- a/conf/boards/navgo_1.0.makefile +++ b/conf/boards/navgo_1.0.makefile @@ -20,11 +20,29 @@ LPC21ISP_BAUD = 38400 LPC21ISP_XTAL = 12000 +# +# default LED configuration +# +ifndef RADIO_CONTROL_LED RADIO_CONTROL_LED = 1 +endif +ifndef BARO_LED BARO_LED = 2 +endif +ifndef AHRS_ALIGNER_LED AHRS_ALIGNER_LED = 3 +endif + +ifndef GPS_LED +GPS_LED = 4 +endif + +ifndef SYS_TIME_LED +SYS_TIME_LED = none +endif + ### default settings ifndef GPS_PORT @@ -33,7 +51,6 @@ endif ifndef GPS_BAUD GPS_BAUD = B38400 endif -GPS_LED = 4 ifndef MODEM_PORT MODEM_PORT = UART1 diff --git a/conf/boards/tiny_2.11.makefile b/conf/boards/tiny_2.11.makefile index 706ebf8154..53a6d4f355 100644 --- a/conf/boards/tiny_2.11.makefile +++ b/conf/boards/tiny_2.11.makefile @@ -19,6 +19,28 @@ endif LPC21ISP_BAUD = 38400 LPC21ISP_XTAL = 12000 +# +# default LED configuration +# +ifndef RADIO_CONTROL_LED +RADIO_CONTROL_LED = none +endif + +ifndef BARO_LED +BARO_LED = none +endif + +ifndef AHRS_ALIGNER_LED +AHRS_ALIGNER_LED = none +endif + +ifndef GPS_LED +GPS_LED = 2 +endif + +ifndef SYS_TIME_LED +SYS_TIME_LED = none +endif ### default settings for tiny_2 and twog ifndef GPS_PORT @@ -27,7 +49,6 @@ endif ifndef GPS_BAUD GPS_BAUD = B38400 endif -GPS_LED = 2 ifndef MODEM_PORT MODEM_PORT = UART1 @@ -36,7 +57,6 @@ ifndef MODEM_BAUD MODEM_BAUD = B57600 endif -RADIO_CONTROL_LED = none ADC_IR_TOP = ADC_0 ADC_IR1 = ADC_1 diff --git a/conf/boards/umarim_1.0.makefile b/conf/boards/umarim_1.0.makefile index 3ebc16dbcd..c1eb9b600e 100644 --- a/conf/boards/umarim_1.0.makefile +++ b/conf/boards/umarim_1.0.makefile @@ -20,6 +20,30 @@ LPC21ISP_BAUD = 38400 LPC21ISP_XTAL = 12000 +# +# default LED configuration +# +ifndef RADIO_CONTROL_LED +RADIO_CONTROL_LED = none +endif + +ifndef BARO_LED +BARO_LED = none +endif + +ifndef AHRS_ALIGNER_LED +AHRS_ALIGNER_LED = none +endif + +ifndef GPS_LED +GPS_LED = 2 +endif + +ifndef SYS_TIME_LED +SYS_TIME_LED = none +endif + + ### default settings ifndef GPS_PORT GPS_PORT = UART0 @@ -27,9 +51,6 @@ endif ifndef GPS_BAUD GPS_BAUD = B38400 endif -GPS_LED = 2 - -RADIO_CONTROL_LED = none ifndef MODEM_PORT MODEM_PORT = UART1 diff --git a/sw/airborne/arch/lpc21/sys_time_hw.h b/sw/airborne/arch/lpc21/sys_time_hw.h index 9bbf444cce..f4f9637001 100644 --- a/sw/airborne/arch/lpc21/sys_time_hw.h +++ b/sw/airborne/arch/lpc21/sys_time_hw.h @@ -144,9 +144,6 @@ static inline bool_t sys_time_periodic( void ) { if (cpu_time_ticks > TIME_TICKS_PER_SEC) { cpu_time_ticks -= TIME_TICKS_PER_SEC; cpu_time_sec++; -#ifdef TIME_LED - LED_TOGGLE(TIME_LED) -#endif #ifdef SYS_TIME_LED LED_TOGGLE(SYS_TIME_LED) #endif