Skip to content

Add AIKONF4V3 #715

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 3, 2025
Merged

Add AIKONF4V3 #715

merged 7 commits into from
Jun 3, 2025

Conversation

ot0tot
Copy link
Contributor

@ot0tot ot0tot commented Mar 12, 2025

Summary by CodeRabbit

  • New Features
    • Added support for the AIKONF4V3 flight controller board, including configuration for sensors, peripherals, and pin assignments.
    • Enabled features such as accelerometer, gyroscope, barometers, flash memory, on-screen display, and multiple communication interfaces.
    • Introduced customizable options for PWM outputs, blackbox logging, DSHOT protocols, and current/voltage monitoring.

ot0tot and others added 3 commits May 14, 2025 09:17
@ot0tot ot0tot changed the title Add Aikon FC405 Add AIKONF4V3 May 14, 2025
@ot0tot ot0tot marked this pull request as ready for review May 14, 2025 13:21
ot0tot and others added 2 commits May 14, 2025 09:29
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
Copy link

coderabbitai bot commented May 28, 2025

"""

Walkthrough

A new configuration header file for the AIKON4V3 flight controller board has been added. This file defines hardware features, pin assignments, sensor and peripheral enablement, timer and ADC settings, I2C and SPI assignments, as well as default protocol and logging options specific to this board.

Changes

File(s) Change Summary
configs/AIKON4V3/config.h New configuration header for AIKON4V3: defines MCU, board name, sensors, pin mappings, peripherals, timer, ADC, I2C, SPI, and default options

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Firmware
    participant AIKON4V3_Config

    User->>Firmware: Builds firmware for AIKON4V3
    Firmware->>AIKON4V3_Config: Loads config.h
    AIKON4V3_Config-->>Firmware: Provides hardware definitions and settings
    Firmware-->>User: Firmware operates with AIKON4V3-specific features enabled
Loading

Possibly related PRs

Suggested reviewers

  • haslinghuis

Poem

A board named AIKON, new and bright,
With configs set for perfect flight.
Pins and sensors, mapped just so—
The code now knows where currents flow!
With macros neat and logic clear,
The bunny hops and gives a cheer:
"Fly high, AIKON, your time is here!" 🐇✨
"""

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@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/AIKONF4V3/config.h (1)

91-92: Fix trailing whitespace and approve I2C assignments.

The I2C device assignments are correct - both barometer and magnetometer on I2C1 is a standard configuration.

Fix the trailing whitespace:

-#define MAG_I2C_INSTANCE               I2CDEV_1 
+#define MAG_I2C_INSTANCE               I2CDEV_1
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c4353ec and a3c800b.

📒 Files selected for processing (1)
  • configs/AIKONF4V3/config.h (1 hunks)
🔇 Additional comments (10)
configs/AIKONF4V3/config.h (10)

1-22: LGTM! Standard license header and include guards.

The GPL v3 license header and pragma once directive follow Betaflight conventions correctly.


24-27: LGTM! Board identification is properly configured.

The target MCU, board name, and manufacturer ID are correctly defined for the AIKONF4V3 board.


29-38: LGTM! Comprehensive sensor and peripheral enablement.

The enabled features represent a well-rounded set of sensors and peripherals typical for a modern flight controller board:

  • ICM42688P IMU for high-performance motion sensing
  • W25Q128FV flash for blackbox logging
  • Dual barometer support (BMP280 and DPS310)
  • MAX7456 OSD controller for analog video systems

40-77: LGTM! Comprehensive and conflict-free pin assignments.

The pin assignments are well-organized and cover all necessary peripherals:

  • Motor outputs on Timer 2 capable pins (PC6-PC9)
  • Multiple UART interfaces for versatile connectivity
  • Proper SPI pin assignments matching the intended instances
  • ADC pins on port C for analog measurements
  • Appropriate CS pins for SPI device selection

No pin conflicts detected in the assignments.


79-86: LGTM! Timer assignments are appropriate for the pin functions.

The timer pin mapping correctly assigns:

  • Motors to Timer 2 with DMA support for smooth PWM output
  • PPM input to Timer 1 (appropriate for input capture)
  • Servos to Timer 2 without DMA (sufficient for servo control)

The DMA stream distribution helps optimize performance.


88-89: LGTM! ADC configuration matches the assigned pins.

ADC3 with DMA option 1 is correctly configured for the ADC pins (PC1-PC3) assigned earlier.


94-99: LGTM! Well-configured PINIO boxes for auxiliary functions.

The PINIO configuration provides useful auxiliary functions:

  • PINIO1 for "10V BEC" control (likely voltage regulator switching)
  • PINIO2 for "Cam1,2" control (likely camera switching)

The box numbers and configuration values are appropriate for user-defined functions.


101-107: LGTM! Default settings align well with hardware configuration.

The default settings are well-chosen:

  • Flash-based blackbox logging matches the enabled W25Q128FV chip
  • Standard DSHOT configuration for reliable ESC communication
  • ADC-based metering aligns with the configured ADC pins
  • Inverted beeper output suggests proper hardware interface
  • 8MHz system clock is appropriate for this board design

109-112: LGTM! SPI assignments and gyro alignment are correctly configured.

The SPI instance assignments properly match the earlier pin definitions:

  • Gyro on SPI1 with appropriate CS pin (PA4)
  • Flash on SPI2 with appropriate CS pin (PB12)
  • MAX7456 on SPI3 with appropriate CS pin (PA15)

The CW270_DEG gyro alignment accounts for the physical orientation of the IMU on the board.


113-114: LGTM! Comprehensive and well-structured board configuration.

This configuration file provides a complete and professional setup for the AIKONF4V3 flight controller board. It includes all necessary hardware definitions, follows Betaflight conventions, and demonstrates thoughtful pin assignment and peripheral configuration.

@haslinghuis
Copy link
Member

@coderabbitai full review

Copy link

coderabbitai bot commented May 29, 2025

✅ Actions performed

Full review triggered.

Copy link

@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/AIKONF4V3/config.h (1)

79-87: TIMER_PIN_MAPPING Review
The timer mapping macro entries for PWM outputs appear consistent. Consider adding inline comments to clarify channel ordering and motor/servo index associations for future maintainers.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c4353ec and a193d2a.

📒 Files selected for processing (1)
  • configs/AIKONF4V3/config.h (1 hunks)
🔇 Additional comments (14)
configs/AIKONF4V3/config.h (14)

1-20: GPL License Header Looks Good
The standard GPLv3 header is correctly included.


22-28: Verify BOARD_NAME and MANUFACTURER_ID Conventions
Please confirm that BOARD_NAME (AIKONF4V3) and MANUFACTURER_ID (AIKO) match the existing naming conventions and do not conflict with other boards in the repository.


29-38: Confirm Sensor and Barometer Support
You have enabled both BMP280 and DPS310 barometers along with the ICM42688P IMU. Please verify that the hardware on AIKONF4V3 supports both barometers simultaneously and that ACC_ORIENTATION (if required) is correctly handled by the default gyro alignment.


40-45: Motor Pin Assignments Verified
Motor pins PC6–PC9 align with PWM-capable timers on STM32F405. No issues found.


46-49: Check Servo and PPM Input Mapping
RX_PPM_PIN and SERVO1_PIN/SERVO2_PIN (PB6, PB0, PB1) must support input capture (PPM) and PWM output. Ensure these are correctly mapped in TIMER_PIN_MAPPING.


50-56: Missing UART5 TX Definition
UART1–4 TX/RX are defined, and UART5 RX is set to PD2 but no UART5_TX_PIN is specified. Confirm whether UART5 TX is intentionally omitted or if a pin assignment is missing.


57-59: I2C and LED Pin Configuration
I2C1_SCL/SDA on PB8/PB9 and LED0_PIN on PB4 look correct and consistent with other STM32F4 boards.


60-68: SPI Pin Assignments Aligned
SPI1/2/3 SCK, SDI, and SDO pins are mapped correctly to PA5–PA7 (SPI1), PB13–PB15 (SPI2), and PC10–PC12 (SPI3).


69-78: Pin I/O, ADC, Flash CS, OSD CS, Gyro CS/EXTI Check
Pin definitions for PINIO1_PIN, PINIO2_PIN, ADC inputs, flash CS (PB12), OSD CS (PA15), and gyro EXTI/CS (PC4/PA4) match expected hardware wiring.


88-90: ADC Instance and DMA Configuration
Selection of ADC3 with ADC3_DMA_OPT = 1 aligns with your ADC pin mappings and DMA availability.


91-93: I2C Device Instance Consistency
Both barometer and magnetometer I2C instances are set to I2CDEV_1. If these devices share the bus, confirm address conflicts are handled or isolated.


94-100: PINIO Box Configuration
PINIO1_BOX/PINIO2_BOX values (40/41) and user names look reasonable. Ensure these box IDs do not collide with existing pin I/O box assignments in the Betaflight configuration system.


101-108: Default Device and Protocol Settings
Blackbox default to flash, DSHOT burst/bitbang off, ADC current/voltage meters, and inverted beeper are appropriate defaults for AIKONF4V3.


109-113: SPI Instances and Gyro Alignment Set
Gyro on SPI1 with CW270_DEG alignment, flash on SPI2, and OSD on SPI3 match the physical layout.

@sugaarK sugaarK requested review from KarateBrot and nerdCopter June 3, 2025 13:10
Copy link
Member

@nerdCopter nerdCopter left a comment

Choose a reason for hiding this comment

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

  • approving for workflow; unable to test

@haslinghuis haslinghuis merged commit 7970f07 into betaflight:master Jun 3, 2025
2 checks passed
This was referenced Jun 5, 2025
This was referenced Jun 19, 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.

4 participants