Skip to content

Conversation

@ot0tot
Copy link
Contributor

@ot0tot ot0tot commented Dec 5, 2025

Now using the SPL07-003 baro

Summary by CodeRabbit

  • New Features
    • Added DPS310 barometer sensor support across multiple flight controller configurations, enabling improved altitude sensing capabilities.

✏️ Tip: You can customize this high-level summary in your review settings.

Now using the SPL07-003 baro
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 5, 2025

Walkthrough

This PR adds the USE_BARO_DPS310 preprocessor macro to four FLYCOLOR board configuration files, enabling DPS310 barometer support alongside existing barometer options. No logic, control flow, or error-handling changes are present.

Changes

Cohort / File(s) Summary
DPS310 Barometer Configuration
configs/FLYCOLORF4/config.h, configs/FLYCOLORF435/config.h, configs/FLYCOLORF7MICRO/config.h, configs/FLYCOLORH743/config.h
Added #define USE_BARO_DPS310 preprocessor macro to enable DPS310 barometer support in each FLYCOLOR board configuration

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

  • Homogeneous, repetitive changes across 4 files with identical modifications
  • Configuration-only; no functional logic or control flow alterations
  • Straightforward macro additions requiring minimal verification

Possibly related PRs

Suggested reviewers

  • KarateBrot
  • nerdCopter
  • haslinghuis

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is minimal and does not follow the required template structure with mandatory sections like hardware compliance, checklist, or Betaflight review requirements. Complete the PR description using the provided template, including hardware compliance sections, checklist items, and confirmation of reviews. At minimum, address which checklist items apply to this configuration change.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding DPS310 barometer support to Flycolor target configurations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 208d940 and 2670abc.

📒 Files selected for processing (4)
  • configs/FLYCOLORF4/config.h (1 hunks)
  • configs/FLYCOLORF435/config.h (1 hunks)
  • configs/FLYCOLORF7MICRO/config.h (1 hunks)
  • configs/FLYCOLORH743/config.h (1 hunks)
🧰 Additional context used
🧠 Learnings (13)
📓 Common learnings
Learnt from: haslinghuis
Repo: betaflight/config PR: 719
File: configs/SPEDIXG473/config.h:29-38
Timestamp: 2025-07-25T20:06:07.492Z
Learning: BMP280 and DPS310 barometer drivers in Betaflight do not require USE_I2C to be explicitly defined in board configurations. Many existing boards successfully use USE_BARO_BMP280 and USE_BARO_DPS310 without defining USE_I2C, indicating that the I2C dependency is handled automatically by the build system or these sensors support alternative communication methods.
Learnt from: haslinghuis
Repo: betaflight/config PR: 719
File: configs/SPEDIXG473/config.h:29-38
Timestamp: 2025-07-25T20:06:07.492Z
Learning: BMP280 and DPS310 barometer drivers in Betaflight do not require USE_I2C to be explicitly defined in board configurations. Out of 264 boards using these drivers, 259 (98%) work without USE_I2C defined, indicating that the I2C dependency is handled automatically by the build system.
Learnt from: haslinghuis
Repo: betaflight/config PR: 822
File: configs/AXISFLYINGH7MINI/config.h:29-37
Timestamp: 2025-06-23T18:43:31.746Z
Learning: In Betaflight configuration files, feature enablement macros like USE_MAG are build options that can be controlled at compile time, while hardware instance definitions like MAG_I2C_INSTANCE are predefined in board configurations to assist with hardware mapping when those features are enabled at build time.
Learnt from: haslinghuis
Repo: betaflight/config PR: 879
File: configs/AIRBOTSUPERF4V2/config.h:42-45
Timestamp: 2025-08-22T17:08:23.283Z
Learning: In Betaflight board configurations, OSD feature flags like USE_OSD_SD (analog/MAX7456) and USE_OSD_HD (digital/MSP DisplayPort) are typically defined at build time by the build system, not in the individual board config.h files. Board configs can conditionally define OSD-related settings based on these build-time flags.
Learnt from: haslinghuis
Repo: betaflight/config PR: 792
File: configs/FLYWOOF411/config.h:33-33
Timestamp: 2025-05-28T15:48:18.449Z
Learning: The FLYWOOF411 board does not actually use dual gyros despite having GYRO_2_SPI_INSTANCE defined in its configuration. It was incorrectly targeted for GYRO_COUNT and dual gyro support.
Learnt from: haslinghuis
Repo: betaflight/config PR: 656
File: configs/IFLIGHT_F745_AIO/config.h:31-35
Timestamp: 2025-07-28T16:44:59.686Z
Learning: In Betaflight board configurations, when a board design uses the same physical gyro socket but different sensor variants across production batches (e.g., MPU6000 in older batches, ICM42688P in newer batches), the correct approach is to enable both sensor drivers (USE_GYRO_SPI_MPU6000 and USE_GYRO_SPI_ICM42688P) in the same configuration. This allows runtime auto-detection of which sensor is actually present without requiring separate board configurations for each hardware variant.
📚 Learning: 2025-07-25T20:06:07.492Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 719
File: configs/SPEDIXG473/config.h:29-38
Timestamp: 2025-07-25T20:06:07.492Z
Learning: BMP280 and DPS310 barometer drivers in Betaflight do not require USE_I2C to be explicitly defined in board configurations. Many existing boards successfully use USE_BARO_BMP280 and USE_BARO_DPS310 without defining USE_I2C, indicating that the I2C dependency is handled automatically by the build system or these sensors support alternative communication methods.

Applied to files:

  • configs/FLYCOLORH743/config.h
  • configs/FLYCOLORF435/config.h
  • configs/FLYCOLORF7MICRO/config.h
  • configs/FLYCOLORF4/config.h
📚 Learning: 2025-07-25T20:06:07.492Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 719
File: configs/SPEDIXG473/config.h:29-38
Timestamp: 2025-07-25T20:06:07.492Z
Learning: BMP280 and DPS310 barometer drivers in Betaflight do not require USE_I2C to be explicitly defined in board configurations. Out of 264 boards using these drivers, 259 (98%) work without USE_I2C defined, indicating that the I2C dependency is handled automatically by the build system.

Applied to files:

  • configs/FLYCOLORH743/config.h
  • configs/FLYCOLORF435/config.h
  • configs/FLYCOLORF7MICRO/config.h
  • configs/FLYCOLORF4/config.h
📚 Learning: 2025-06-23T18:43:31.746Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 822
File: configs/AXISFLYINGH7MINI/config.h:29-37
Timestamp: 2025-06-23T18:43:31.746Z
Learning: In Betaflight configuration files, feature enablement macros like USE_MAG are build options that can be controlled at compile time, while hardware instance definitions like MAG_I2C_INSTANCE are predefined in board configurations to assist with hardware mapping when those features are enabled at build time.

Applied to files:

  • configs/FLYCOLORH743/config.h
  • configs/FLYCOLORF435/config.h
  • configs/FLYCOLORF7MICRO/config.h
  • configs/FLYCOLORF4/config.h
📚 Learning: 2025-08-22T17:08:23.283Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 879
File: configs/AIRBOTSUPERF4V2/config.h:42-45
Timestamp: 2025-08-22T17:08:23.283Z
Learning: In Betaflight board configurations, OSD feature flags like USE_OSD_SD (analog/MAX7456) and USE_OSD_HD (digital/MSP DisplayPort) are typically defined at build time by the build system, not in the individual board config.h files. Board configs can conditionally define OSD-related settings based on these build-time flags.

Applied to files:

  • configs/FLYCOLORH743/config.h
  • configs/FLYCOLORF435/config.h
  • configs/FLYCOLORF7MICRO/config.h
  • configs/FLYCOLORF4/config.h
📚 Learning: 2025-06-23T18:44:59.162Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 822
File: configs/AXISFLYINGH7MINI/config.h:121-129
Timestamp: 2025-06-23T18:44:59.162Z
Learning: In Betaflight configuration files, USE_OSD_HD and USE_MAX7456 are for different OSD systems: USE_MAX7456 enables the MAX7456 analog OSD chip, while USE_OSD_HD enables HD/digital OSD via MSP. MSP_DISPLAYPORT_UART should be guarded by USE_OSD_HD, not USE_MAX7456, as they serve different OSD implementations.

Applied to files:

  • configs/FLYCOLORH743/config.h
  • configs/FLYCOLORF435/config.h
  • configs/FLYCOLORF7MICRO/config.h
  • configs/FLYCOLORF4/config.h
📚 Learning: 2025-07-28T16:44:59.686Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 656
File: configs/IFLIGHT_F745_AIO/config.h:31-35
Timestamp: 2025-07-28T16:44:59.686Z
Learning: In Betaflight board configurations, when a board design uses the same physical gyro socket but different sensor variants across production batches (e.g., MPU6000 in older batches, ICM42688P in newer batches), the correct approach is to enable both sensor drivers (USE_GYRO_SPI_MPU6000 and USE_GYRO_SPI_ICM42688P) in the same configuration. This allows runtime auto-detection of which sensor is actually present without requiring separate board configurations for each hardware variant.

Applied to files:

  • configs/FLYCOLORH743/config.h
  • configs/FLYCOLORF435/config.h
  • configs/FLYCOLORF7MICRO/config.h
  • configs/FLYCOLORF4/config.h
📚 Learning: 2025-08-10T14:08:56.662Z
Learnt from: blckmn
Repo: betaflight/config PR: 851
File: configs/HELLBENDER_0001/config.h:45-46
Timestamp: 2025-08-10T14:08:56.662Z
Learning: In Betaflight, USE_LED_STRIP is a cloud build option that enables/disables the LED strip feature at build time. Individual target config files (configs/*/config.h) only need to define LED_STRIP_PIN as a default pin assignment - they should not define USE_LED_STRIP themselves. The feature enablement is handled externally through the cloud build system, not through preprocessor directives in the config files.

Applied to files:

  • configs/FLYCOLORH743/config.h
📚 Learning: 2025-07-03T04:33:57.480Z
Learnt from: ot0tot
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-07-03T04:33:57.480Z
Learning: Always verify that the BOARD_NAME define in each config.h matches the directory name it resides in (e.g., configs/AXISFLYINGF7AIO/config.h must have #define BOARD_NAME AXISFLYINGF7AIO). This check is required for all Betaflight board configuration reviews.

Applied to files:

  • configs/FLYCOLORF435/config.h
📚 Learning: 2025-05-28T15:42:05.402Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 792
File: configs/BEEROTORF4/config.h:30-30
Timestamp: 2025-05-28T15:42:05.402Z
Learning: The DEFAULT_GYRO_ENABLED macro with both gyros enabled (GYRO_MASK(0) | GYRO_MASK(1)) should only be added to board configurations that have DEFAULT_GYRO_TO_USE set to GYRO_CONFIG_USE_GYRO_BOTH. Boards without this setting should only get the GYRO_COUNT definition to specify the number of available gyros.

Applied to files:

  • configs/FLYCOLORF435/config.h
  • configs/FLYCOLORF7MICRO/config.h
  • configs/FLYCOLORF4/config.h
📚 Learning: 2025-05-28T15:42:05.402Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 792
File: configs/BEEROTORF4/config.h:30-30
Timestamp: 2025-05-28T15:42:05.402Z
Learning: The DEFAULT_GYRO_ENABLED macro with both gyros enabled (GYRO_MASK(0) | GYRO_MASK(1)) should only be added to board configurations that have DEFAULT_GYRO_TO_USE set to GYRO_CONFIG_USE_GYRO_BOTH. Boards without this setting should only get the GYRO_COUNT definition.

Applied to files:

  • configs/FLYCOLORF435/config.h
  • configs/FLYCOLORF7MICRO/config.h
  • configs/FLYCOLORF4/config.h
📚 Learning: 2025-05-28T15:45:15.608Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 792
File: configs/MERAKRCF722/config.h:32-32
Timestamp: 2025-05-28T15:45:15.608Z
Learning: The presence of GYRO_2_SPI_INSTANCE definition in a board config does not necessarily mean the board uses dual gyros. Some boards have GYRO_2_SPI_INSTANCE defined but it's not actually used, so they should not receive GYRO_COUNT or other dual-gyro related definitions. Only boards that actually utilize dual gyros should get these definitions.

Applied to files:

  • configs/FLYCOLORF435/config.h
  • configs/FLYCOLORF7MICRO/config.h
  • configs/FLYCOLORF4/config.h
📚 Learning: 2025-07-03T15:17:30.040Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-07-03T15:17:30.040Z
Learning: In Betaflight configurations, when a target name suggests dual IMUs (like JHEF7DUAL) but specific hardware variants only have one gyro available, the preferred solution is to use DEFAULT_GYRO_TO_USE macro to specify which gyro to use by default rather than pruning gyro defines or creating redundant configurations. This approach maintains compatibility when the same target is used by multiple hardware variants from the same manufacturer.

Applied to files:

  • configs/FLYCOLORF435/config.h
  • configs/FLYCOLORF7MICRO/config.h
  • configs/FLYCOLORF4/config.h
🔇 Additional comments (4)
configs/FLYCOLORF4/config.h (1)

34-34: LGTM! Multi-sensor support added correctly.

Adding USE_BARO_DPS310 alongside the existing USE_BARO_BMP388 enables runtime auto-detection of which barometer variant is present on the hardware. This follows the established Betaflight pattern for supporting multiple sensor variants across production batches.

Based on learnings, the DPS310 driver does not require explicit USE_I2C definition—the I2C dependency is handled automatically by the build system.

configs/FLYCOLORF435/config.h (1)

35-35: LGTM! Consistent with other FLYCOLOR targets.

The addition of USE_BARO_DPS310 mirrors the change in the other FLYCOLOR configurations and correctly enables runtime detection between BMP388 and DPS310 barometer variants.

configs/FLYCOLORF7MICRO/config.h (1)

34-34: LGTM! Barometer variant support added correctly.

The USE_BARO_DPS310 addition is consistent across all FLYCOLOR targets in this PR and properly enables multi-sensor support.

configs/FLYCOLORH743/config.h (1)

35-35: LGTM! H743 target updated consistently.

The USE_BARO_DPS310 macro completes the barometer support updates across all FLYCOLOR targets, enabling runtime detection of the SPL07-003/DPS310 sensor variant.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@haslinghuis haslinghuis merged commit 5987fd5 into betaflight:master Dec 6, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants