Add HWF435 target#1074
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughAdds a new Betaflight board configuration header for HWF435 (AT32F435G, 8 MHz HSE) specifying board identity, enabled sensors/peripherals, detailed pin mappings, timer routing, bus/spi/i2c instances, and Betaflight default settings. ChangesHWF435 Board Configuration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Comment |
Remove MPU6500 definitions as requested. Co-authored-by: Hebo98 <72866967+Hebo98@users.noreply.github.com>
…F435/config.h HWF435 does not have onboard MAG or GNSS modules according to the schematic, so these user feature defines should not be enabled in config.h. Co-authored-by: Osiris Inferi <github@flut.nl.eu.org>
There was a problem hiding this comment.
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.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@configs/HWF435/config.h`:
- Line 30: Remove the deprecated BMI270 macro: delete the define
USE_ACCGYRO_BMI270 from the HWF435 config to stop enabling the BMI270 driver;
instead verify the flight controller actually populates a BMI270 in
production—if it does, flag the hardware for redesign to use a supported IMU or
replace the define with the supported IMU macro; ensure no other code paths
(e.g., init functions or references to USE_ACCGYRO_BMI270) remain enabled or
compiled for HWF435 after removal.
🪄 Autofix (Beta)
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
Run ID: f5976e82-613f-4746-a009-1238d71d3ac7
📒 Files selected for processing (1)
configs/HWF435/config.h
Sorry, that was a typo. Co-authored-by: Osiris Inferi <github@flut.nl.eu.org>
Thank you for your advice. Co-authored-by: Osiris Inferi <github@flut.nl.eu.org>
The previous roll/pitch/yaw alignment was equivalent to a 90 degree yaw rotation, so simplify it to DEFAULT_ALIGN_BOARD_YAW 90.
Co-authored-by: Osiris Inferi <github@flut.nl.eu.org>
Based on osirisinferi’s suggestion, we added a user-switchable VTX control port. The specific control port is PC14.
There was a problem hiding this comment.
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.
Actionable comments posted: 2
♻️ Duplicate comments (1)
configs/HWF435/config.h (1)
30-30:⚠️ Potential issue | 🟠 Major
USE_ACCGYRO_BMI270is deprecated for new target submissions.BMI270 has been deprecated for new submissions since September 16, 2024 due to drift/calibration issues. Since HWF435 is a new target (not a rebrand of existing hardware), please remove this define unless BMI270 is actually a populated sensor variant on production boards — and even in that case the hardware should be reconsidered.
🛡️ Proposed change
`#define` USE_GYRO_SPI_ICM42688P `#define` USE_ACC_SPI_ICM42688P -#define USE_ACCGYRO_BMI270 `#define` USE_ACCGYRO_LSM6DSK320XBased on learnings: F411 MCU, SPI-based RX, and BMI270 gyro are deprecated platforms as of September 16, 2024; new target submissions using these should be flagged.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@configs/HWF435/config.h` at line 30, The config currently defines the deprecated symbol USE_ACCGYRO_BMI270 for the HWF435 target; remove this define (the USE_ACCGYRO_BMI270 macro) from the HWF435 configuration unless the BMI270 is actually present on production boards, and if it is present, escalate to hardware review and replace with a supported accelerometer/gyro macro (or add a guarded legacy variant flag and document why it’s required); also update related build/config references and any README/docs that mention USE_ACCGYRO_BMI270 to reflect the removal or the justified exception.
🧹 Nitpick comments (1)
configs/HWF435/config.h (1)
113-114: Optional: tidy up multiple consecutive blank lines and stray trailing whitespace.Lines 113–114, 130–131 and 144 contain extra blank lines, and line 41 has trailing whitespace after
PB2. Minor formatting nit only.Also applies to: 130-131, 144-144
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@configs/HWF435/config.h` around lines 113 - 114, Remove the stray trailing whitespace after the PB2 token and collapse multiple consecutive blank lines into a single blank line in this config.h section; specifically trim trailing spaces for the PB2 declaration and delete the extra empty lines around the nearby configuration blocks so only single separation lines remain, then run a quick whitespace/formatter pass to ensure no other trailing spaces or duplicate blank lines remain.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@configs/HWF435/config.h`:
- Around line 115-128: TIMER_PIN_MAPPING is missing the beeper pin entry for PB2
(TMR20 CH1) and the macro lacks the trailing backslash to allow another entry;
update the TIMER_PIN_MAPPING macro by adding a new line with TIMER_PIN_MAP(13,
PB2, 2, -1) and ensure the previous line ends with a trailing backslash so the
macro continues correctly; locate the macro definition named TIMER_PIN_MAPPING
and modify it to include the new TIMER_PIN_MAP entry for index 13 (PB2) and fix
the line continuation backslash.
- Around line 115-128: Validate and correct the TIMER_PIN_MAPPING entries
against timer_at32f43x.c: ensure PB4 and PB5 (TIMER_PIN_MAP 6 and 7) refer to
non-complementary channels (not CHxN) suitable for motors, confirm
TIMER_PIN_MAP(10, PB3, 1, -1) indeed maps to TIM2_CH2 (SERVO3) and adjust
occurrence/DMA if not, verify PH2 DMA index 11 (TIMER_PIN_MAP 11) is valid and
not colliding with other timers/DMAMUX users and change it to a unique DMA index
if needed, and reassess GYRO_1_CLKIN_PIN PA8 (TIM1_CH1) so it does not consume
TIM1 required for bitbanged DShot when motors 1–4 are on TIM8 (free up TIM1/TIM8
as required); update the corresponding TIMER_PIN_MAP rows and any DMA index
constants to match the AT32F435 definitions in timer_at32f43x.c.
---
Duplicate comments:
In `@configs/HWF435/config.h`:
- Line 30: The config currently defines the deprecated symbol USE_ACCGYRO_BMI270
for the HWF435 target; remove this define (the USE_ACCGYRO_BMI270 macro) from
the HWF435 configuration unless the BMI270 is actually present on production
boards, and if it is present, escalate to hardware review and replace with a
supported accelerometer/gyro macro (or add a guarded legacy variant flag and
document why it’s required); also update related build/config references and any
README/docs that mention USE_ACCGYRO_BMI270 to reflect the removal or the
justified exception.
---
Nitpick comments:
In `@configs/HWF435/config.h`:
- Around line 113-114: Remove the stray trailing whitespace after the PB2 token
and collapse multiple consecutive blank lines into a single blank line in this
config.h section; specifically trim trailing spaces for the PB2 declaration and
delete the extra empty lines around the nearby configuration blocks so only
single separation lines remain, then run a quick whitespace/formatter pass to
ensure no other trailing spaces or duplicate blank lines remain.
🪄 Autofix (Beta)
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
Run ID: cd0fb5cf-8e46-4115-9b24-f0065dfa064a
📒 Files selected for processing (1)
configs/HWF435/config.h
Co-authored-by: Osiris Inferi <github@flut.nl.eu.org>
Summary by CodeRabbit