From f326eda2de21873884c3ccfc9b2353abb228f325 Mon Sep 17 00:00:00 2001 From: Dominic Clifton Date: Tue, 12 Mar 2024 17:44:18 +0100 Subject: [PATCH] SPRacingH7EXTREME/H7NANO/H7ZERO/H7RF - Compile-in LED strip by default. (#354) * SPRacingH7EXTREME - Compile in LED strip by default, the hardware has a pad specifically for LED strip. Without this users will be confused when the LED strip feature cannot be enabled. * SPRacingH7NANO, SPRacingH7ZERO, SPRacingH7RF - Compile-in LED strip by default. All hardware has pads/ports. * Gate the enabling of LED_STRIP, as it's a cloud build option. Without gating you get compilation errors: ``` make CONFIG=SPRACINGH7EXTREME EXTRA_FLAGS="-DCLOUD_BUILD -DUSE_LED_STRIP" In file included from ./src/main/platform.h:30, from ./src/main/drivers/bus_i2c_timing.c:23: ./src/config/configs/SPRACINGH7EXTREME/config.h:129: error: "USE_LED_STRIP" redefined [-Werror] 129 | #define USE_LED_STRIP ``` --- configs/SPRACINGH7EXTREME/config.h | 5 +++++ configs/SPRACINGH7NANO/config.h | 5 +++++ configs/SPRACINGH7RF/config.h | 5 +++++ configs/SPRACINGH7ZERO/config.h | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/configs/SPRACINGH7EXTREME/config.h b/configs/SPRACINGH7EXTREME/config.h index 4de3632d..e124cae5 100644 --- a/configs/SPRACINGH7EXTREME/config.h +++ b/configs/SPRACINGH7EXTREME/config.h @@ -127,6 +127,11 @@ #define USE_SDCARD #define USE_TRANSPONDER +// The target has a specific set of pads for the LED strip. +#ifndef USE_LED_STRIP +#define USE_LED_STRIP +#endif + #define BEEPER_PIN PD7 #define MOTOR1_PIN PA0 #define MOTOR2_PIN PA1 diff --git a/configs/SPRACINGH7NANO/config.h b/configs/SPRACINGH7NANO/config.h index 42754f01..45db478c 100644 --- a/configs/SPRACINGH7NANO/config.h +++ b/configs/SPRACINGH7NANO/config.h @@ -136,6 +136,11 @@ #define USE_CAMERA_CONTROL #define USE_MAX7456 +// The target has a specific set of pads for the LED strip. +#ifndef USE_LED_STRIP +#define USE_LED_STRIP +#endif + #define BEEPER_PIN PD7 #define MOTOR1_PIN PA0 #define MOTOR2_PIN PA1 diff --git a/configs/SPRACINGH7RF/config.h b/configs/SPRACINGH7RF/config.h index dff68391..707c25b8 100644 --- a/configs/SPRACINGH7RF/config.h +++ b/configs/SPRACINGH7RF/config.h @@ -153,6 +153,11 @@ #define USE_FLASH_W25Q128FV #define USE_SDCARD +// The target has a connector and circuit for the LED strip. +#ifndef USE_LED_STRIP +#define USE_LED_STRIP +#endif + #ifndef USE_OSD #define USE_OSD #endif diff --git a/configs/SPRACINGH7ZERO/config.h b/configs/SPRACINGH7ZERO/config.h index 37bf280b..ef2846c1 100644 --- a/configs/SPRACINGH7ZERO/config.h +++ b/configs/SPRACINGH7ZERO/config.h @@ -147,6 +147,11 @@ #define USE_CAMERA_CONTROL #define USE_MAX7456 +// The target has a specific set of pads for the LED strip. +#ifndef USE_LED_STRIP +#define USE_LED_STRIP +#endif + #define BEEPER_PIN PD7 #define MOTOR1_PIN PA0 #define MOTOR2_PIN PA1