Skip to content

Conversation

LYNHQQ
Copy link

@LYNHQQ LYNHQQ commented Jul 8, 2025

User description

add target hummingbird fc305


PR Type

Enhancement


Description

  • Add complete target support for HUMMINGBIRD_FC305 flight controller

  • Configure ICM42605 IMU, SPL06 barometer, and MAX7456 OSD

  • Set up 6 UART ports with CRSF receiver on UART6

  • Enable SD card logging and LED strip support


Changes diagram

flowchart LR
  A["New Target"] --> B["Hardware Config"]
  B --> C["SPI Devices"]
  B --> D["I2C Sensors"]
  B --> E["UART Ports"]
  C --> F["ICM42605 IMU"]
  C --> G["MAX7456 OSD"]
  C --> H["SD Card"]
  D --> I["SPL06 Baro"]
  E --> J["CRSF RX"]
Loading

Changes walkthrough 📝

Relevant files
Configuration changes
target.h
Main target hardware configuration definitions                     

src/main/target/HUMMINGBIRD_FC305/target.h

  • Define board identifier and USB product string
  • Configure SPI buses for IMU, OSD, and SD card
  • Set up I2C bus for barometer and magnetometer
  • Define 6 UART ports with CRSF receiver configuration
  • Enable LED strip, ADC channels, and default features
  • +163/-0 
    target.c
    Hardware device registration and timer setup                         

    src/main/target/HUMMINGBIRD_FC305/target.c

  • Register SPI devices for ICM42605 IMU, SD card, MAX7456 OSD
  • Register I2C device for SPL06 barometer
  • Define timer hardware for 4 motor outputs and LED strip
  • +41/-0   
    config.c
    Target-specific default configuration settings                     

    src/main/target/HUMMINGBIRD_FC305/config.c

  • Set SPL06 as default barometer hardware
  • Configure UART4 for ESC serial communication
  • Set up PINIO box for permanent user control
  • +33/-0   
    CMakeLists.txt
    CMake build configuration                                                               

    src/main/target/HUMMINGBIRD_FC305/CMakeLists.txt

    • Add CMake target definition for STM32F722XE processor
    +2/-0     

    Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • Copy link

    qodo-merge-pro bot commented Jul 8, 2025

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Device Mismatch

    The ICM42605 device is registered with variable name busdev_icm42688 which suggests ICM42688 hardware, but the device type is DEVHW_ICM42605. This naming inconsistency could lead to confusion during maintenance.

    BUSDEV_REGISTER_SPI_TAG(busdev_icm42688, DEVHW_ICM42605, ICM42605_SPI_BUS, ICM42605_CS_PIN, NONE, 0, DEVFLAGS_NONE, IMU_ICM42605_ALIGN);
    BUSDEV_REGISTER_SPI(busdev_sdcard_spi,  DEVHW_SDCARD,       SDCARD_SPI_BUS,     SDCARD_CS_PIN,      NONE,           DEVFLAGS_SPI_MODE_0,  0);
    Duplicate Definition

    USE_OSD is defined twice in the file, once at line 81 and again at line 161. This redundant definition should be removed to avoid potential compilation issues.

    #define USE_OSD
    #define USE_DSHOT

    Copy link

    qodo-merge-pro bot commented Jul 8, 2025

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Impact
    General
    Fix device name inconsistency

    The variable name busdev_icm42688 doesn't match the device type DEVHW_ICM42605.
    This inconsistency could cause confusion and potential issues when referencing
    the device.

    src/main/target/HUMMINGBIRD_FC305/target.c [27]

    -BUSDEV_REGISTER_SPI_TAG(busdev_icm42688, DEVHW_ICM42605, ICM42605_SPI_BUS, ICM42605_CS_PIN, NONE, 0, DEVFLAGS_NONE, IMU_ICM42605_ALIGN);
    +BUSDEV_REGISTER_SPI_TAG(busdev_icm42605, DEVHW_ICM42605, ICM42605_SPI_BUS, ICM42605_CS_PIN, NONE, 0, DEVFLAGS_NONE, IMU_ICM42605_ALIGN);
    • Apply / Chat
    Suggestion importance[1-10]: 7

    __

    Why: The suggestion correctly identifies a naming inconsistency between the registered device busdev_icm42688 and its type DEVHW_ICM42605, improving code clarity and preventing potential future bugs.

    Medium
    Remove duplicate macro definition
    Suggestion Impact:The commit removed the duplicate USE_OSD macro definition as suggested, eliminating the redundant definition

    code diff:

    -#define USE_OSD

    The USE_OSD macro is defined twice in the file. This duplication is unnecessary
    and could lead to preprocessor warnings or confusion during compilation.

    src/main/target/HUMMINGBIRD_FC305/target.h [81-161]

     #define USE_OSD
     #define USE_MAX7456
    -MAX7456_SPI_BUS		    BUS_SPI3
    +#define MAX7456_SPI_BUS		    BUS_SPI3
     #define MAX7456_CS_PIN          PC13
    -...
    -#define USE_OSD

    [To ensure code accuracy, apply this suggestion manually]

    Suggestion importance[1-10]: 4

    __

    Why: The suggestion correctly identifies that the USE_OSD macro is defined twice (lines 81 and 161), and removing the redundant definition improves code quality.

    Low
    Fix inconsistent indentation formatting

    The line contains mixed tabs and spaces for indentation, which can cause
    formatting inconsistencies. Use consistent spacing to match the surrounding code
    style.

    src/main/target/HUMMINGBIRD_FC305/target.h [83]

    -#define MAX7456_SPI_BUS		    BUS_SPI3
    +#define MAX7456_SPI_BUS         BUS_SPI3
    • Apply / Chat
    Suggestion importance[1-10]: 3

    __

    Why: The suggestion correctly points out inconsistent use of tabs and spaces for alignment on line 83, and fixing it improves code style and readability.

    Low
    • Update

    @sensei-hacker sensei-hacker added the New target This PR adds a new target label Jul 8, 2025
    @sensei-hacker
    Copy link
    Collaborator

    sensei-hacker commented Aug 30, 2025

    • Samples received
    • Flash firmware
    • Calibrate
    • Orientation matches
    • Gyro working
    • Accel working
    • Baro working
    • UART1
    • UART2
    • UART3
    • UART4
    • UART5
    • UART6 (onboard elrs)
    • Analog Camera working
    • Video Out working
    • OSD working
    • LEDs working
    • Buzzer working
    • DShot support on m1-4 ( see HUMMINGBIRD_FC305 motor order newbeedrone/inav#1 )
    • Additional motor / servo outputs (none)
    • Blackbox
    • RSSI (none)
    • Voltage
    • Current
    • I2C Bus
    • PINIO1

    @sensei-hacker
    Copy link
    Collaborator

    In testing, the OSD does not seem to function for me. I see the board does not have the standard MAX7456 chip?

    @sensei-hacker
    Copy link
    Collaborator

    For the motor order to match the silkscreen, please see:
    newbeedrone#1

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    New target This PR adds a new target Review effort 2/5
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants