Skip to content

Add UAVDF722BT - #1180

Open
haslinghuis wants to merge 8 commits into
betaflight:masterfrom
haslinghuis:add-UAVDF722BT
Open

Add UAVDF722BT#1180
haslinghuis wants to merge 8 commits into
betaflight:masterfrom
haslinghuis:add-UAVDF722BT

Conversation

@haslinghuis

@haslinghuis haslinghuis commented Aug 7, 2026

Copy link
Copy Markdown
Member

Checklist (✓/✕, or y/n)

  • passed Betaflight team's schematics review
  • passed hardware samples testing
  • follows guidelines
  • follows connector standards
  • flight tested
  • comments/issues resolved

Summary by CodeRabbit

  • New Features
    • Added support for the UAVF722BTV5 flight controller target.
    • Enabled configuration for onboard peripherals, including sensors, motors, servos, UART, I²C, SPI, LEDs, beeper, camera control, and PINIO controls.
    • Added default settings for blackbox logging, DShot, current measurement, and voltage measurement.

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1ae5671e-f199-4ba7-a25a-4f84566ea33b

📥 Commits

Reviewing files that changed from the base of the PR and between 88b85ea and 79909cc.

📒 Files selected for processing (1)
  • configs/UAVD/UAVF722BTV5/config.h

Walkthrough

Changes

UAVF722BTV5 target

Layer / File(s) Summary
Target identity and device selection
configs/UAVD/UAVF722BTV5/config.h
Adds board metadata, STM32F722 target identity, supported sensors, flash, and MAX7456 configuration.
Hardware mapping and runtime defaults
configs/UAVD/UAVF722BTV5/config.h
Adds pin, timer, DMA, peripheral, PINIO, gyro, and meter settings for the target.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • betaflight/config#1150: Adds another STM32F722 flight-controller target with board-specific peripheral and timer mappings.
  • betaflight/config#1160: Adds an STM32F7 target configuration with similar board-level macros and peripheral mappings.
  • betaflight/config#1173: Adds another STM32F722 target configuration with board-specific hardware mappings and defaults.

Suggested reviewers: nerdcopter

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description includes the checklist but omits required details about reviews, compliance, hardware, testing, and branch housekeeping. Add the required PR summary, review and compliance details, branch confirmation, and completed checklist results.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title identifies the addition of UAVDF722BT support, which matches the target configuration change, although it omits the V5 suffix.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Comment thread configs/UAVD/UAVDF722BT/config.h Outdated
Comment thread configs/UAVD/UAVDF722BT/config.h
Comment thread configs/UAVD/UAVDF722BT/config.h Outdated
Comment thread configs/UAVD/UAVDF722BT/config.h Outdated
haslinghuis added a commit to haslinghuis/schema-convert that referenced this pull request Aug 7, 2026
Both found reviewing betaflight/config#1180, which was generated by this tool -
so what it missed, the tool missed.

CAM_CTRL was classified as nothing, so that board lost camera control entirely:
the net was read, matched no rule, and the feature never appeared. The pattern
took CONTROL and CONTROLL but not CTRL, and CAM but not CAMERA before either.
PB8 there carries TIM4_CH3, so it was always a valid camera control pin.

DEFAULT_BLACKBOX_DEVICE = BLACKBOX_DEVICE_FLASH required only USE_FLASH, which
says the driver is compiled in and nothing about the chip being reachable. That
PR ships FLASH_CS_PIN, USE_FLASH and BLACKBOX_DEVICE_FLASH with no instance, so
pg/flash.c leaves it NULL and logging is dead on arrival - exactly the 4.10 case
the check exists to catch, and it did not. It now also requires one of
FLASH_SPI_INSTANCE, FLASH_QUADSPI_INSTANCE or FLASH_OCTOSPI_INSTANCE; a needs
entry may be a tuple meaning any one of them.

Corpus: 0 defines change - both are spellings and a check, and no corpus board
uses CAM_CTRL. Measured against a baseline regenerated with the change stashed,
because the artifact I first compared against had been built from a different
board list and showed a 70-define delta that had nothing to do with either edit.

The strengthened check reports what the weak one could not: 44 of 104 boards
emit DEFAULT_BLACKBOX_DEVICE with no way to reach the device. Left as a warning
for now rather than suppressing the define, since that is a behaviour change on
42% of the corpus and wants deciding on its own.

Goldens: two boards, one warning each.
haslinghuis added a commit to haslinghuis/schema-convert that referenced this pull request Aug 7, 2026
…, and

PINIO boxes take their name from the net

Both from reviewing betaflight/config#1180, and the first one disagrees with the
review.

The reviewer added a TIMER_PIN_MAP row for BEEPER_PIN. Checked before copying
it: beeperInit() reads beeperFrequency from BEEPER_PWM_HZ, which defaults to 0,
and only calls beeperPwmInit() when it is non-zero. An active buzzer - what
almost every board has - is plain GPIO and never allocates the timer, so the row
does nothing. It is a widespread copy-paste: 25 of 619 shipped targets carry a
beeper row and exactly one of them sets BEEPER_PWM_HZ. So no row is emitted;
instead inert_beeper_timer_row() says so when one is present without the
frequency, since a reviewer adding it expects an effect and a passive buzzer
needs both halves.

The beeper is now a rate class, which is the half of the review that was right.
Its choice of occurrence 2 for camera control - TIM10_CH1 rather than the tool's
TIM4_CH3 - avoids sharing TIM4 with a beeper on CH4, and the rate check could
not see that because the beeper was not a class. It can now.

BOX_USERn_NAME is taken from the net. Half the corpus's PINIO nets say what the
switch does - VTX-SWITCH, CAM_SW, BEC12V_EN, 9V_EN - which is a better button
label than "PINIO1"; the other half say nothing and keep the positional
fallback. Tidied, not translated: the old code turned anything containing VTX
into "VTX PWR", which claims the switch controls power where the sheet said only
"switch". Capped at 15, the longest any shipped target uses.

Corpus: defines unchanged, no board's define set changed - box names are values.
Goldens: three boards, digests only, "VTX PWR" -> "VTX SW" and "PINIO2" ->
"CAM SW".

@osirisinferi osirisinferi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sorry, missed this earlier.

Comment thread configs/UAVD/UAVDF722BT/config.h Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Warning

CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.

Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.

👉 Steps to fix this

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@configs/UAVD/UAVDF722BT/config.h`:
- Around line 22-33: Remove the generator-operator text from the header comment,
specifically the “No REFERENCE directive” paragraph and its follow-up
instruction. In the target configuration, replace the unregistered UAVD
manufacturer usage with an existing registered MANUFACTURER_ID, or add the UAVD
entry to Manufacturers.md before assigning it.
- Around line 81-87: Confirm the flash chip’s SPI bus from the schematic, then
add the missing FLASH_SPI_INSTANCE definition near FLASH_CS_PIN, using SPI3 if
that is the connected bus. Ensure the existing USE_FLASH and blackbox flash
configuration routes the flash device through that instance without changing the
gyro or MAX7456 assignments.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b36c2b63-cdd6-42d6-89a1-ba2610358969

📥 Commits

Reviewing files that changed from the base of the PR and between 749fff1 and 67625fb.

📒 Files selected for processing (1)
  • configs/UAVD/UAVDF722BT/config.h

Comment on lines +22 to +33
/*
Generated from SCH_原理图_5.0.5.pdf
Schematic sha256: 03a9f5864dc03d59e265cfc4107a88e9205a9510b7e9c37295faf167de67a8c8
MCU symbol: 64 pins on page 3 of 8
Converted: 2026-08-08
Pin tables validated against Betaflight c18421eb5 (branch master, seeded 2026-08-04)
Manufacturer: UAVD - NOT REGISTERED in betaflight/config Manufacturers.md @ 18ffb2a74 (2026-07-23)

No REFERENCE directive: this target has not been reviewed by
the Betaflight team. They issue that value; it cannot be
computed here. Re-run with --reference once it is provided.
*/

@coderabbitai coderabbitai Bot Aug 8, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Remove the generator boilerplate and register the manufacturer ID.

Lines 30-32 address the generator operator, not readers of this repository. Remove them.

The comment also states that UAVD is not registered in Manufacturers.md. A new MANUFACTURER_ID must be registered before this target can be merged. Submit the manufacturer entry, or reuse an existing registered ID.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@configs/UAVD/UAVDF722BT/config.h` around lines 22 - 33, Remove the
generator-operator text from the header comment, specifically the “No REFERENCE
directive” paragraph and its follow-up instruction. In the target configuration,
replace the unregistered UAVD manufacturer usage with an existing registered
MANUFACTURER_ID, or add the UAVD entry to Manufacturers.md before assigning it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@coderabbitai this will be replaced once we have a sha. There is already a PR for adding the manufacturer.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

gh pr list \
  --repo betaflight/config \
  --state open \
  --search 'UAVD in:title,body' \
  --limit 20 \
  --json number,title,url,body,files

Length of output: 317


🏁 Script executed:

#!/bin/bash
set -euo pipefail

gh pr list \
  --repo betaflight/config \
  --state open \
  --search 'manufacturer in:title,body' \
  --limit 50 \
  --json number,title,url,files \
  --jq '.[] | {
    number,
    title,
    url,
    matching_files: [.files[]?.path | select(test("Manufacturers\\.md$"))]
  } | select(.matching_files | length > 0)'

Length of output: 2882


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- Target manufacturer declaration ---'
rg -n -C 2 '^\s*`#define`\s+MANUFACTURER_ID\b' configs/UAVD/UAVDF722BT/config.h

printf '%s\n' '--- PR `#1179` Manufacturers.md patch ---'
gh api \
  repos/betaflight/config/pulls/1179/files \
  --paginate \
  --jq '.[] | select(.filename == "Manufacturers.md") | .patch'

Length of output: 1081


@haslinghuis, confirmed. Pull request #1179 registers the exact UAVD MANUFACTURER_ID used by this target.

The manufacturer registration does not require a separate change in this PR, provided #1179 merges before this target. I also understand that the temporary header paragraph will be replaced when the reference SHA is available.

You are interacting with an AI system.

Comment thread configs/UAVD/UAVF722BTV5/config.h
Comment thread configs/UAVD/UAVF722BTV5/config.h Outdated
Co-authored-by: Osiris Inferi <github@flut.nl.eu.org>
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.

2 participants