Skip to content

Commit

Permalink
SPRacingH7EXTREME/H7NANO/H7ZERO/H7RF - Compile-in LED strip by defaul…
Browse files Browse the repository at this point in the history
…t. (betaflight#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
```
  • Loading branch information
hydra authored Mar 12, 2024
1 parent 0d155eb commit f326eda
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions configs/SPRACINGH7EXTREME/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions configs/SPRACINGH7NANO/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions configs/SPRACINGH7RF/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions configs/SPRACINGH7ZERO/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f326eda

Please sign in to comment.