diff --git a/Makefile b/Makefile index e2b76957e..40d3c7177 100644 --- a/Makefile +++ b/Makefile @@ -1016,7 +1016,8 @@ STM32F7xx_COMMON_SRC = \ drivers/serial_uart_stm32f7xx.c \ drivers/serial_uart_hal.c -F7EXCLUDES = drivers/bus_spi.c \ +F7EXCLUDES = \ + drivers/bus_spi.c \ drivers/bus_i2c.c \ drivers/timer.c \ drivers/serial_uart.c diff --git a/src/main/drivers/light_led.h b/src/main/drivers/light_led.h index 9a559eae7..198a3f324 100644 --- a/src/main/drivers/light_led.h +++ b/src/main/drivers/light_led.h @@ -31,7 +31,7 @@ typedef struct statusLedConfig_s { PG_DECLARE(statusLedConfig_t, statusLedConfig); // Helpful macros -#ifdef UNIT_TEST +#if defined(UNIT_TEST) || defined(USE_FAKE_LED) #define LED0_TOGGLE NOOP #define LED0_OFF NOOP diff --git a/src/main/fc/fc_init.c b/src/main/fc/fc_init.c index 53a72e11e..b3794a5b7 100644 --- a/src/main/fc/fc_init.c +++ b/src/main/fc/fc_init.c @@ -223,7 +223,9 @@ void init(void) targetPreInit(); #endif +#if !defined(UNIT_TEST) && !defined(USE_FAKE_LED) ledInit(statusLedConfig()); +#endif LED2_ON; #ifdef USE_EXTI diff --git a/src/main/target/SITL/target.h b/src/main/target/SITL/target.h index dc811d924..d7d39d97b 100644 --- a/src/main/target/SITL/target.h +++ b/src/main/target/SITL/target.h @@ -45,6 +45,8 @@ #undef SCHEDULER_DELAY_LIMIT #define SCHEDULER_DELAY_LIMIT 1 +#define USE_FAKE_LED + #define ACC #define USE_FAKE_ACC