Skip to content

Conversation

@YI-BOYANG
Copy link
Contributor

@YI-BOYANG YI-BOYANG commented Sep 29, 2025

Added bmp280 and dps310, set the default UART, and added the configuration for pinio1.

Summary by CodeRabbit

  • New Features

    • Added barometer support (BMP280, DPS310) on TAKERF722SE.
    • Enabled MSP DisplayPort over UART1 for on-screen display integrations.
  • Changes

    • Default Serial RX moved to UART2 (was UART3).
    • Removed BMI270 accelerometer/gyroscope configuration in favor of barometer-focused options.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 29, 2025

Walkthrough

Updated TAKERF722SE board config: removed BMI270 accel/gyro macro; added generic and specific barometer macros (BMP280, DPS310); moved SERIALRX_UART from USART3 to USART2; added MSP_DISPLAYPORT_UART set to USART1.

Changes

Cohort / File(s) Summary
TAKERF722SE config updates
configs/TAKERF722SE/config.h
Removed USE_ACCGYRO_BMI270; added USE_BARO, USE_BARO_BMP280, USE_BARO_DPS310; changed SERIALRX_UART from SERIAL_PORT_USART3 to SERIAL_PORT_USART2; added MSP_DISPLAYPORT_UART = SERIAL_PORT_USART1.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • ot0tot
  • haslinghuis
  • blckmn

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description currently consists of a single sentence summarizing the added sensors and UART change without following the repository’s required template sections for pull-request requirements, hardware compliance, housekeeping, and checklist items. It lacks details on schematics review, hardware testing, guidelines adherence, and flight testing. As a result, it does not meet the structure or content expectations defined in the description template. Please update the PR description to include all required sections from the repository template, including mandatory review for new flight controllers, hardware compliance details with guideline links, housekeeping notes on branch and target, and a completed checklist covering schematics review, hardware testing, connector standards, and flight testing. Ensure each item is clearly marked as passed or pending and provide any additional relevant details such as design guidelines references and resolved issues. Without these sections the pull request cannot be properly reviewed against the project standards.
Title Check ❓ Inconclusive The title “Update TAKERF722SE” is overly generic and does not convey the specific changes in this pull request, such as adding barometer sensor support and updating UART configurations. It lacks detail and fails to highlight the primary feature additions that are central to the changeset. As a result, it does not meet the criteria for a concise, descriptive title that helps reviewers understand the main change at a glance. Please revise the pull request title to clearly reflect the primary changes implemented in this update. For example, “Add BMP280 and DPS310 support and update UART defaults for TAKERF722SE” highlights the key additions. A more descriptive title helps reviewers and future collaborators quickly understand what the PR introduces.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ 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 d5c6d06 and cbf76f6.

📒 Files selected for processing (1)
  • configs/TAKERF722SE/config.h (2 hunks)
🧰 Additional context used
🧠 Learnings (5)
📚 Learning: 2025-07-23T13:43:50.456Z
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-23T13:43:50.456Z
Learning: For Betaflight board configuration reviews, always verify that serial port defines use valid identifiers from the serialPortIdentifier_e enum in src/main/io/serial.h. Valid identifiers include: SERIAL_PORT_USB_VCP (20), SERIAL_PORT_SOFTSERIAL1 (30), SERIAL_PORT_SOFTSERIAL2 (31), SERIAL_PORT_LPUART1 (40), SERIAL_PORT_UART0 (50, if SERIAL_UART_FIRST_INDEX == 0), SERIAL_PORT_USART1 (51 or 50), SERIAL_PORT_USART2, SERIAL_PORT_USART3, SERIAL_PORT_UART4, SERIAL_PORT_UART5, SERIAL_PORT_USART6, SERIAL_PORT_USART7, SERIAL_PORT_USART8, SERIAL_PORT_UART9, SERIAL_PORT_USART10. While some aliases exist (like SERIAL_PORT_UART3 = SERIAL_PORT_USART3), prefer using the primary identifiers as referenced in the serialPortIdentifiers array to avoid build failures.

Applied to files:

  • configs/TAKERF722SE/config.h
📚 Learning: 2025-08-20T02:54:58.596Z
Learnt from: ot0tot
PR: betaflight/config#872
File: configs/HGLRCH743/config.h:82-83
Timestamp: 2025-08-20T02:54:58.596Z
Learning: For Betaflight board configuration reviews, the definitive source for validating UART pin assignments is the serial_uart_{platform}.c file in the Betaflight codebase (e.g., serial_uart_stm32h7xx.c for STM32H7xx platforms), not generic MCU datasheets. These files contain the exact pin mappings that Betaflight supports for each UART peripheral.

Applied to files:

  • configs/TAKERF722SE/config.h
📚 Learning: 2025-07-23T13:43:50.456Z
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-23T13:43:50.456Z
Learning: For Betaflight board configuration reviews, always verify that serial port defines (like ESC_SENSOR_UART, MSP_UART, GPS_UART, etc.) use valid SERIAL_PORT identifiers that match those defined in the Betaflight codebase at src/main/io/serial.h. Common valid identifiers include SERIAL_PORT_USART1, SERIAL_PORT_USART2, SERIAL_PORT_USART3, SERIAL_PORT_UART4, SERIAL_PORT_UART5, etc. Invalid identifiers like SERIAL_PORT_UART3 (should be SERIAL_PORT_USART3) will cause build failures.

Applied to files:

  • configs/TAKERF722SE/config.h
📚 Learning: 2025-07-25T20:06:07.492Z
Learnt from: haslinghuis
PR: betaflight/config#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/TAKERF722SE/config.h
📚 Learning: 2025-07-25T20:06:07.492Z
Learnt from: haslinghuis
PR: betaflight/config#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/TAKERF722SE/config.h
🔇 Additional comments (3)
configs/TAKERF722SE/config.h (3)

109-109: Verify the MSP DisplayPort UART assignment.

The addition of MSP_DISPLAYPORT_UART set to SERIAL_PORT_USART1 was not mentioned in the PR description or previous review discussions. This enables MSP-based display communication on UART1.

Please confirm:

  1. Is USART1 intended for MSP DisplayPort functionality?
  2. Does this conflict with any existing or planned peripherals on USART1?
  3. Since the board already has MAX7456 OSD support (lines 40, 88, 120), what is the use case for MSP DisplayPort?

110-110: LGTM: UART assignment matches FC hardware design.

The change from SERIAL_PORT_USART3 to SERIAL_PORT_USART2 for serial RX is appropriate, as confirmed in the previous review discussion that UART2 is specifically designed for RX communication on this FC.


34-36: Clarify barometer sensor choice and driver support.

  • Previous discussion specified SPL06-001, but this config enables BMP280 and DPS310.
  • Betaflight has no SPL06 driver references—confirm which IC your hardware will use.
  • If SPL06-001 is intended, add and enable its driver macro (e.g. USE_BARO_SPI_LPS).
  • If switching to BMP280 or DPS310, define only the macro matching the actual sensor.

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
configs/TAKERF722SE/config.h (1)

109-111: UART assignments valid; confirm PA3 sharing between PPM and Serial RX

MSP_DISPLAYPORT_UART=SERIAL_PORT_USART1 and SERIALRX_UART=SERIAL_PORT_USART2 use valid identifiers. Note PA3 is both RX_PPM_PIN (Line 55) and UART2 RX (Line 64); that overlap is common but mutually exclusive at runtime. Please confirm this pin‑share is intended for this target and documented for users.
If helpful, add a brief comment above RX_PPM_PIN noting it shares PA3 with USART2 RX.

📜 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 44d61f3 and d5c6d06.

📒 Files selected for processing (1)
  • configs/TAKERF722SE/config.h (3 hunks)
🧰 Additional context used
🧠 Learnings (9)
📚 Learning: 2025-07-25T20:06:07.492Z
Learnt from: haslinghuis
PR: betaflight/config#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/TAKERF722SE/config.h
📚 Learning: 2025-07-25T20:06:07.492Z
Learnt from: haslinghuis
PR: betaflight/config#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/TAKERF722SE/config.h
📚 Learning: 2025-07-28T16:44:59.686Z
Learnt from: haslinghuis
PR: betaflight/config#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/TAKERF722SE/config.h
📚 Learning: 2025-06-23T18:43:31.746Z
Learnt from: haslinghuis
PR: betaflight/config#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/TAKERF722SE/config.h
📚 Learning: 2025-05-28T15:45:15.608Z
Learnt from: haslinghuis
PR: betaflight/config#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/TAKERF722SE/config.h
📚 Learning: 2025-05-28T15:42:05.402Z
Learnt from: haslinghuis
PR: betaflight/config#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/TAKERF722SE/config.h
📚 Learning: 2025-07-03T15:17:30.040Z
Learnt from: haslinghuis
PR: betaflight/config#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/TAKERF722SE/config.h
📚 Learning: 2025-07-23T13:43:50.456Z
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-23T13:43:50.456Z
Learning: For Betaflight board configuration reviews, always verify that serial port defines (like ESC_SENSOR_UART, MSP_UART, GPS_UART, etc.) use valid SERIAL_PORT identifiers that match those defined in the Betaflight codebase at src/main/io/serial.h. Common valid identifiers include SERIAL_PORT_USART1, SERIAL_PORT_USART2, SERIAL_PORT_USART3, SERIAL_PORT_UART4, SERIAL_PORT_UART5, etc. Invalid identifiers like SERIAL_PORT_UART3 (should be SERIAL_PORT_USART3) will cause build failures.

Applied to files:

  • configs/TAKERF722SE/config.h
📚 Learning: 2025-07-23T13:43:50.456Z
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-23T13:43:50.456Z
Learning: For Betaflight board configuration reviews, always verify that serial port defines use valid identifiers from the serialPortIdentifier_e enum in src/main/io/serial.h. Valid identifiers include: SERIAL_PORT_USB_VCP (20), SERIAL_PORT_SOFTSERIAL1 (30), SERIAL_PORT_SOFTSERIAL2 (31), SERIAL_PORT_LPUART1 (40), SERIAL_PORT_UART0 (50, if SERIAL_UART_FIRST_INDEX == 0), SERIAL_PORT_USART1 (51 or 50), SERIAL_PORT_USART2, SERIAL_PORT_USART3, SERIAL_PORT_UART4, SERIAL_PORT_UART5, SERIAL_PORT_USART6, SERIAL_PORT_USART7, SERIAL_PORT_USART8, SERIAL_PORT_UART9, SERIAL_PORT_USART10. While some aliases exist (like SERIAL_PORT_UART3 = SERIAL_PORT_USART3), prefer using the primary identifiers as referenced in the serialPortIdentifiers array to avoid build failures.

Applied to files:

  • configs/TAKERF722SE/config.h
🔇 Additional comments (2)
configs/TAKERF722SE/config.h (2)

34-36: Baro enablement looks correct; no explicit USE_I2C needed

USE_BARO plus BMP280 and DPS310 with BARO_I2C_INSTANCE=I2CDEV_1 and I2C1 pins defined is consistent. Many boards ship exactly this without defining USE_I2C, so this is fine. (Based on learnings)


122-122: PINIO1_BOX value verified: 40 matches BOX_PINIO1 in upstream Betaflight master (as of 2025-09-29). No changes needed.


// serial 5 1024 115200 57600 0 115200
#define MSP_DISPLAYPORT_UART SERIAL_PORT_USART1
#define SERIALRX_UART SERIAL_PORT_USART2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default UART port functions are generally only used for peripherals that are integrated onto the board itself, or BNF quads where the factory setup will consistently use those specific ports. If you cannot ensure consistency, it's best to leave this up to the user or factory setup

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imageIn the design of FC, UART2 is specifically used for RX communication. However, the target has not been modified before.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that's how it comes set up in the BNFs that use it, that's probably fine

#define MAX7456_SPI_INSTANCE SPI2
#define PINIO1_CONFIG 129
#define PINIO1_BOX 0
#define PINIO1_BOX 40
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you changing this? What does PINIO 1 control?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because some users have requested that USER1 be used to control the on/off of the 12V power supply.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is PINIO1 connected to on the FC? Can you post the schematic in the Discord?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QQ_1759201293471 This is the schematic diagram of the PINIO1 connection. It can control a pad to output 12V voltage.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So for the past several years the VTX power on this FC was tied to the arm switch? That makes no sense. Have you changed the design?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are making changes to the FC design, this requires a new target.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that the new design and the old design can use the same target; there is no need to create a new one. However, the new design is still under planning. If you don't agree with the modifications made by pinio1, I can first cancel them and then we can have a discussion later. We need to add a barometer now.

Copy link
Contributor

@ot0tot ot0tot Oct 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this FC have a barometer? The product page and images make no mention of it.
https://geprc.com/product/geprc-taker-f722-se-flight-controller/

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our subsequent plan is to add the "spl06-001 baro" to it.

Copy link
Contributor

@ot0tot ot0tot Oct 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. The SPL06 is a poor quality baro, use something better.
  2. Any revisions to the FC require a new review. The design as-is does not meet the current standards.

@ot0tot ot0tot closed this Oct 11, 2025
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