Skip to content

Add AXISFLYINGH7MINI#822

Open
haslinghuis wants to merge 4 commits intobetaflight:masterfrom
haslinghuis:axisflyingh7mini
Open

Add AXISFLYINGH7MINI#822
haslinghuis wants to merge 4 commits intobetaflight:masterfrom
haslinghuis:axisflyingh7mini

Conversation

@haslinghuis
Copy link
Member

@haslinghuis haslinghuis commented Jun 23, 2025

Checklist

  • passed 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 AXISFLYINGH7MINI flight controller with full hardware mappings for sensors, peripherals, motors (up to 8), LEDs, UART/I2C/SPI buses, ADC inputs, beeper, flash, and OSD.
  • Defaults
    • Enabled blackbox logging to onboard flash, voltage/current monitoring, and bitbanged ESC protocol by default.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 23, 2025

Walkthrough

Adds a new board configuration header configs/AXISFLYINGH7MINI/config.h that declares MCU/board identifiers and maps sensors, peripherals, pins, timers, DMA, UART/I2C/SPI instances, default device settings, beeper/LED inversion, and pin-IO configurations for the AXISFLYINGH7MINI board.

Changes

Cohort / File(s) Summary
Board config
configs/AXISFLYINGH7MINI/config.h
New board config for AXISFLYINGH7MINI: sets FC_TARGET_MCU, BOARD_NAME, MANUFACTURER_ID; enables sensors/peripherals (dual ICM42688P accel/gyro, DPS310 baro, W25Q128FV flash, MAX7456 OSD); defines motor pins, LED/LED_STRIP pins, UART/I2C/SPI/ADC/GPIO pin mappings, gyro CS/EXTI pins, TIMER_PIN_MAPPING, ADC DMA options, I2C/UART/SPI instance assignments, default devices (BLACKBOX on flash, DSHOT bitbang), beeper/LED inversion, and PINIO configs/box IDs.

Sequence Diagram(s)

(Skipped — change is a single board config header without multi-component runtime control-flow changes.)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • Add HWH7 (STM32H743) config – initial #893 — Adds another STM32H743 board config header with matching dual ICM42688P gyros, DPS310 baro, W25 flash, MAX7456 OSD, and similar pin/timer/SPI mappings.
  • Add AIRBRAINH743 #924 — Adds a STM32H743 board configuration header with similar peripheral macros (ICM42688P, DPS310, W25Q128), timer pin mappings, and instance assignments.
  • Add AXISFLYING_H743PRO #972 — Adds AXISFLYING STM32H743 board config header with comparable sensor/peripheral macros and pin/SPI/USART assignments.

Suggested labels

Awaiting prototype samples

Suggested reviewers

  • ot0tot
  • nerdCopter
  • blckmn
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description includes only a checklist but lacks the required context, explanation, and supporting information specified in the template. Provide detailed description of the hardware, explain the configuration changes, confirm hardware compliance, and fill out the complete checklist with verification status for each requirement.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add AXISFLYINGH7MINI' directly and specifically describes the main change: introducing a new board configuration file for the AXISFLYINGH7MINI flight controller.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 marked this pull request as draft June 23, 2025 18:35
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: 2

🧹 Nitpick comments (3)
configs/AXISFLYINGH7MINI/config.h (3)

68-71: Document I2C bus usage.

Add inline comments indicating which sensors use I2C1 vs. I2C2 (e.g., barometer vs. external magnetometer) to aid future maintainers.


130-133: Reconsider default DSHOT implementation.

Hardware DSHOT support is available on STM32H7—using bitbang by default may underutilize built-in timers. Consider defaulting to hardware DSHOT or document why bitbang is preferred.


143-143: Add trailing newline.

Ensure the file ends with a newline to comply with POSIX text file conventions.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 96eebb9 and 4d5afcd.

📒 Files selected for processing (1)
  • configs/AXISFLYINGH7MINI/config.h (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
configs/AXISFLYINGH7MINI/config.h (1)
Learnt from: haslinghuis
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-06-02T16:16:20.197Z
Learning: In STM32F405-based flight controller configurations, timer pin mappings must be carefully analyzed for DMA stream conflicts, especially between motor timers, LED strip timers, and SPI DMA assignments. Changes to TIMER_PIN_MAPPING should include verification that all required peripherals (motors, LED strip, blackbox SPI) can coexist without DMA conflicts.
🔇 Additional comments (8)
configs/AXISFLYINGH7MINI/config.h (8)

1-20: Skip license header review.

Standard GPL header appears consistent with other Betaflight configs.


22-28: Verify BOARD_NAME and MANUFACTURER_ID formatting.

Ensure these macros use the same literal style (e.g., quoted strings) as existing board configs for consistency in build scripts and UI display.


39-50: Validate motor & LED pin mappings against schematic.

Double-check that MOTOR1_PINMOTOR8_PIN and LED_STRIP_PIN assignments match the physical PCB silk-screen and that no GPIO remapping conflicts exist.


52-67: Missing UART5 pin assignments?

You specify TX/RX for USART1–4 and UART6–8 but skip USART5. Verify if USART5 is unavailable on STM32H743 or if its pins were overlooked.


103-112: Validate timer pin mapping against DMA streams.

Per retrieved learnings, confirm that the timers for motors (channels 0–7) and the LED strip (channel 8) do not share DMA streams used by SPI (flash, gyros, OSD) to avoid runtime collisions.


114-117: Confirm ADC DMA channel selections.

Ensure ADC1_DMA_OPT = 9, ADC2_DMA_OPT = 10, and ADC3_DMA_OPT = 11 correspond to the correct stream/channel mapping on STM32H743 so ADC sampling isn’t lost.


135-138: Verify PINIO box IDs.

Confirm that PINIO1_BOX = 40 and PINIO2_BOX = 41 align with the Betaflight UI/config schema for these configurable pins.


139-142: SPI instance assignments look correct.

GYRO_1_SPI_INSTANCE = SPI1 (PA5), GYRO_2_SPI_INSTANCE = SPI4 (PE12), FLASH_SPI_INSTANCE = SPI3 (PB3), and MAX7456_SPI_INSTANCE = SPI2 (PB13) align with the SCK pin definitions.

@haslinghuis haslinghuis marked this pull request as ready for review October 22, 2025 10:47
@haslinghuis haslinghuis requested a review from ot0tot October 31, 2025 18:16
Co-authored-by: Osiris Inferi <github@flut.nl.eu.org>
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.

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

140-141: Consider adding DEFAULT_GYRO_TO_USE if dual gyro operation is intended.

The config defines GYRO_2_SPI_INSTANCE on SPI4, similar to the AOCODARCH7DUAL reference board which also defines DEFAULT_GYRO_TO_USE GYRO_CONFIG_USE_GYRO_BOTH. If both gyros are meant to be active by default, add:

`#define` DEFAULT_GYRO_TO_USE GYRO_CONFIG_USE_GYRO_BOTH

If only the primary gyro is intended with the second as an optional/alternate, the current config is fine.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@configs/AXISFLYINGH7MINI/config.h` around lines 140 - 141, Add an explicit
default gyro selection to match the dual-gyro wiring: if both gyros defined by
GYRO_1_SPI_INSTANCE and GYRO_2_SPI_INSTANCE should be active by default, define
DEFAULT_GYRO_TO_USE to GYRO_CONFIG_USE_GYRO_BOTH; otherwise leave as-is to keep
only the primary active. Locate where GYRO_1_SPI_INSTANCE and
GYRO_2_SPI_INSTANCE are declared and add the DEFAULT_GYRO_TO_USE definition
nearby using the symbol GYRO_CONFIG_USE_GYRO_BOTH when enabling both.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@configs/AXISFLYINGH7MINI/config.h`:
- Around line 140-141: Add an explicit default gyro selection to match the
dual-gyro wiring: if both gyros defined by GYRO_1_SPI_INSTANCE and
GYRO_2_SPI_INSTANCE should be active by default, define DEFAULT_GYRO_TO_USE to
GYRO_CONFIG_USE_GYRO_BOTH; otherwise leave as-is to keep only the primary
active. Locate where GYRO_1_SPI_INSTANCE and GYRO_2_SPI_INSTANCE are declared
and add the DEFAULT_GYRO_TO_USE definition nearby using the symbol
GYRO_CONFIG_USE_GYRO_BOTH when enabling both.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7467bb60-a914-4013-b413-1cc961b26011

📥 Commits

Reviewing files that changed from the base of the PR and between 2f9d83b and bcce14c.

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

#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
#define BEEPER_INVERTED
#define LED0_INVERTED
#define PINIO1_CONFIG 129
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add box labels to these user boxes?

#define USE_FLASH_W25Q128FV
#define USE_MAX7456

#define BEEPER_PIN PA15
Copy link
Contributor

Choose a reason for hiding this comment

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

TIM2 should be open for passive buzzer support

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.

4 participants