Skip to content

Conversation

kedeng
Copy link
Contributor

@kedeng kedeng commented Sep 5, 2025

  • 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 SPEEDYBEEF435AIOELRS flight controller (AT32F435G-based).
    • Enabled onboard accel/gyro (ICM42688P) with preset alignment and gyro clock-in.
    • Added barometer (DPS310) and I2C configuration for environmental sensors.
    • Onboard flash (W25Q128FV) enabled for Blackbox logging by default.
    • Default DSHOT bitbang mode with telemetry enabled.
    • Configured 4 motor outputs, inverted beeper, status LED and LED strip.
    • ADC-based voltage/current sensing with preset scale and offset; predefined UART/I2C/SPI ports and serial/MSP routing.
    • System clock and timer pin mappings defined for hardware timers and peripherals.

Copy link
Contributor

coderabbitai bot commented Sep 5, 2025

Walkthrough

Adds a new Betaflight board config header for SPEEDYBEEF435AIOELRS: declares MCU/board IDs, enables sensors/peripherals (ICM42688P, DPS310, W25Q128FV), maps SPI/I2C/UART/ADC/timer pins, and sets blackbox, DSHOT, ADC/current/voltage defaults.

Changes

Cohort / File(s) Summary of changes
New target config
configs/SPEEDYBEEF435AIOELRS/config.h
Adds full board configuration: FC_TARGET_MCU, BOARD_NAME, MANUFACTURER_ID; enables USE_ACC/USE_GYRO (ICM42688P SPI), USE_BARO (DPS310), USE_FLASH (W25Q128FV), USE_GYRO_CLKIN; defines motor pins, UART/I2C/SPI pins, gyro CS/EXTI/CLKIN, flash CS, ADC pins, LED/BEEPER/LED_STRIP pins; timer-to-pin channel mapping (TIMER_PIN_MAPPING with TIMER_PIN_MAP entries); ADC_INSTANCE, ADC1_DMA_OPT; BEEPER_INVERTED, SYSTEM_HSE_MHZ; I2C/gyro/flash instances and gyro alignment; defaults for blackbox, DSHOT, meter source/scale/offset; MSP_UART and SERIALRX_UART.

Sequence Diagram(s)

(omitted — changes are a static hardware configuration header; no runtime control-flow change)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • ot0tot
  • haslinghuis
  • nerdCopter
  • sugaarK

Pre-merge checks (2 passed, 1 warning)

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The current description only lists the checklist items but omits all mandatory sections from the repository’s template—such as the Pull-Request requirements header, links to design guidelines, the Housekeeping section, and an overview of the changes—so it does not adhere to the required structure. Update the pull-request description to include the full template sections: add the mandatory review introduction with guideline links, a brief summary of the new board support changes, the housekeeping instructions, and ensure all checklist items and comment statuses are addressed.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title “Add SPEEDYBEEF435AIOELRS” succinctly and directly conveys the primary change of introducing the new SPEEDYBEEF435AIOELRS target configuration, making it clear and concise for anyone scanning the pull-request history.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description currently contains only the checklist items from the repository template with some boxes checked, but it omits required or expected material from the template such as completed Betaflight schematics review, hardware samples testing details, and attachments or links to schematics/test reports, and it does not replace the placeholder "Replace this text with details of your own." The PR comments show a reviewer question about PC15 (ELRS-PW_SWITCH) and a maintainer response that the pin was removed in an updated board, yet that resolution is not captured in the PR description. Because the description lacks these essential review artifacts and an explicit record of resolved reviewer questions, it is incomplete for a new flight controller submission. Please update the PR description to attach or link schematics and hardware test reports, explicitly mark or explain pending checklist items (schematics review and hardware sample testing), document the PC15 change and its intended/default state on the current board revision, and resolve outstanding comments so reviewers have the necessary artifacts to complete the acceptance process.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title "Add SPEEDYBEEF435AIOELRS" is concise and directly describes the primary change in this PR — adding board support for the SPEEDYBEEF435AIOELRS target (configs/SPEEDYBEEF435AIOELRS/config.h). It is short, specific, and free of extraneous content, so a teammate scanning history would understand the main intent.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fc30ac4 and d4c5387.

📒 Files selected for processing (1)
  • configs/SPEEDYBEEF435AIOELRS/config.h (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • configs/SPEEDYBEEF435AIOELRS/config.h

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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.

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: 0

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

54-56: I2C2 on PH2/PH3: check alternate-function overlap with UART4.

AT32F435 often supports UART4 on PH2/PH3; your config uses them for I2C2, which is fine but precludes UART4 on those pins. Consider adding a note to prevent later conflicts.

Apply:

 #define I2C2_SCL_PIN            PH2
 #define I2C2_SDA_PIN            PH3
+// NOTE: PH2/PH3 are used for I2C2; on AT32F435 these pins can also map to UART4.
+// This target reserves them for I2C; UART4 on PH2/PH3 is not available.
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between e0af134 and f61c337.

📒 Files selected for processing (1)
  • configs/SPEEDYBEEF435AIOELRS/config.h (1 hunks)
🧰 Additional context used
🧠 Learnings (11)
📓 Common learnings
Learnt from: haslinghuis
PR: betaflight/config#835
File: configs/HDZERO_HALO_MPU6000/config.h:44-56
Timestamp: 2025-07-14T16:16:56.822Z
Learning: For Betaflight board configurations of boards already in production, pin assignments in config.h files reflect the actual hardware design and cannot be changed, even if they present potential conflicts with debug interfaces. The configuration must match the physical board layout, not ideal software design preferences.
Learnt from: haslinghuis
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-03T15:17:30.040Z
Learning: In Betaflight configurations, when a target name suggests dual IMUs (like JHEF7DUAL) but specific hardware variants only have one gyro available, the preferred solution is to use DEFAULT_GYRO_TO_USE macro to specify which gyro to use by default rather than pruning gyro defines or creating redundant configurations. This approach maintains compatibility when the same target is used by multiple hardware variants from the same manufacturer.
Learnt from: haslinghuis
PR: betaflight/config#879
File: configs/AIRBOTSUPERF4V2/config.h:42-45
Timestamp: 2025-08-22T17:08:23.283Z
Learning: In Betaflight board configurations, OSD feature flags like USE_OSD_SD (analog/MAX7456) and USE_OSD_HD (digital/MSP DisplayPort) are typically defined at build time by the build system, not in the individual board config.h files. Board configs can conditionally define OSD-related settings based on these build-time flags.
Learnt from: haslinghuis
PR: betaflight/config#822
File: configs/AXISFLYINGH7MINI/config.h:29-37
Timestamp: 2025-06-23T18:43:31.746Z
Learning: In Betaflight configuration files, feature enablement macros like USE_MAG are build options that can be controlled at compile time, while hardware instance definitions like MAG_I2C_INSTANCE are predefined in board configurations to assist with hardware mapping when those features are enabled at build time.
Learnt from: haslinghuis
PR: betaflight/config#835
File: configs/HDZERO_HALO_MPU6000/config.h:29-35
Timestamp: 2025-07-14T16:16:50.628Z
Learning: GYRO_1_SPI_CLOCK_DIVIDER is not used in any Betaflight target configuration files. SPI clock frequency settings are not commonly configured at the target level.
Learnt from: ot0tot
PR: betaflight/config#872
File: configs/HGLRCH743/config.h:82-83
Timestamp: 2025-08-20T02:54:58.596Z
Learning: For Betaflight board configuration reviews, the definitive source for validating UART pin assignments is the serial_uart_{platform}.c file in the Betaflight codebase (e.g., serial_uart_stm32h7xx.c for STM32H7xx platforms), not generic MCU datasheets. These files contain the exact pin mappings that Betaflight supports for each UART peripheral.
Learnt from: ot0tot
PR: betaflight/config#681
File: configs/NYX405V1/config.h:26-28
Timestamp: 2025-07-14T15:47:16.394Z
Learning: In Betaflight configuration files, MANUFACTURER_ID values must be exactly 4 ASCII characters long, not 3 characters. All manufacturer IDs in the codebase consistently use 4-character identifiers like AIRB, FOSS, SPBE, MTKS, NERC, etc.
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-03T04:33:57.480Z
Learning: Always verify that the BOARD_NAME define in each config.h matches the directory name it resides in (e.g., configs/AXISFLYINGF7AIO/config.h must have #define BOARD_NAME AXISFLYINGF7AIO). This check is required for all Betaflight board configuration reviews.
Learnt from: haslinghuis
PR: betaflight/config#656
File: configs/IFLIGHT_F745_AIO/config.h:31-35
Timestamp: 2025-07-28T16:44:59.686Z
Learning: In Betaflight board configurations, when a board design uses the same physical gyro socket but different sensor variants across production batches (e.g., MPU6000 in older batches, ICM42688P in newer batches), the correct approach is to enable both sensor drivers (USE_GYRO_SPI_MPU6000 and USE_GYRO_SPI_ICM42688P) in the same configuration. This allows runtime auto-detection of which sensor is actually present without requiring separate board configurations for each hardware variant.
📚 Learning: 2025-07-14T16:16:56.822Z
Learnt from: haslinghuis
PR: betaflight/config#835
File: configs/HDZERO_HALO_MPU6000/config.h:44-56
Timestamp: 2025-07-14T16:16:56.822Z
Learning: For Betaflight board configurations of boards already in production, pin assignments in config.h files reflect the actual hardware design and cannot be changed, even if they present potential conflicts with debug interfaces. The configuration must match the physical board layout, not ideal software design preferences.

Applied to files:

  • configs/SPEEDYBEEF435AIOELRS/config.h
📚 Learning: 2025-07-03T04:33:57.480Z
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-03T04:33:57.480Z
Learning: Always verify that the BOARD_NAME define in each config.h matches the directory name it resides in (e.g., configs/AXISFLYINGF7AIO/config.h must have #define BOARD_NAME AXISFLYINGF7AIO). This check is required for all Betaflight board configuration reviews.

Applied to files:

  • configs/SPEEDYBEEF435AIOELRS/config.h
📚 Learning: 2025-06-02T16:16:20.197Z
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.

Applied to files:

  • configs/SPEEDYBEEF435AIOELRS/config.h
📚 Learning: 2025-07-23T13:43:50.456Z
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-23T13:43:50.456Z
Learning: For Betaflight board configuration reviews, always verify that serial port defines (like ESC_SENSOR_UART, MSP_UART, GPS_UART, etc.) use valid SERIAL_PORT identifiers that match those defined in the Betaflight codebase at src/main/io/serial.h. Common valid identifiers include SERIAL_PORT_USART1, SERIAL_PORT_USART2, SERIAL_PORT_USART3, SERIAL_PORT_UART4, SERIAL_PORT_UART5, etc. Invalid identifiers like SERIAL_PORT_UART3 (should be SERIAL_PORT_USART3) will cause build failures.

Applied to files:

  • configs/SPEEDYBEEF435AIOELRS/config.h
📚 Learning: 2025-08-20T02:54:58.596Z
Learnt from: ot0tot
PR: betaflight/config#872
File: configs/HGLRCH743/config.h:82-83
Timestamp: 2025-08-20T02:54:58.596Z
Learning: For Betaflight board configuration reviews, the definitive source for validating UART pin assignments is the serial_uart_{platform}.c file in the Betaflight codebase (e.g., serial_uart_stm32h7xx.c for STM32H7xx platforms), not generic MCU datasheets. These files contain the exact pin mappings that Betaflight supports for each UART peripheral.

Applied to files:

  • configs/SPEEDYBEEF435AIOELRS/config.h
📚 Learning: 2025-07-23T13:43:50.456Z
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-23T13:43:50.456Z
Learning: For Betaflight board configuration reviews, always verify that serial port defines use valid identifiers from the serialPortIdentifier_e enum in src/main/io/serial.h. Valid identifiers include: SERIAL_PORT_USB_VCP (20), SERIAL_PORT_SOFTSERIAL1 (30), SERIAL_PORT_SOFTSERIAL2 (31), SERIAL_PORT_LPUART1 (40), SERIAL_PORT_UART0 (50, if SERIAL_UART_FIRST_INDEX == 0), SERIAL_PORT_USART1 (51 or 50), SERIAL_PORT_USART2, SERIAL_PORT_USART3, SERIAL_PORT_UART4, SERIAL_PORT_UART5, SERIAL_PORT_USART6, SERIAL_PORT_USART7, SERIAL_PORT_USART8, SERIAL_PORT_UART9, SERIAL_PORT_USART10. While some aliases exist (like SERIAL_PORT_UART3 = SERIAL_PORT_USART3), prefer using the primary identifiers as referenced in the serialPortIdentifiers array to avoid build failures.

Applied to files:

  • configs/SPEEDYBEEF435AIOELRS/config.h
📚 Learning: 2025-06-23T18:43:31.746Z
Learnt from: haslinghuis
PR: betaflight/config#822
File: configs/AXISFLYINGH7MINI/config.h:29-37
Timestamp: 2025-06-23T18:43:31.746Z
Learning: In Betaflight configuration files, feature enablement macros like USE_MAG are build options that can be controlled at compile time, while hardware instance definitions like MAG_I2C_INSTANCE are predefined in board configurations to assist with hardware mapping when those features are enabled at build time.

Applied to files:

  • configs/SPEEDYBEEF435AIOELRS/config.h
📚 Learning: 2025-08-28T20:45:36.652Z
Learnt from: haslinghuis
PR: betaflight/config#888
File: configs/ZEX_ATHENA_MINI/config.h:0-0
Timestamp: 2025-08-28T20:45:36.652Z
Learning: In STM32H743 Betaflight configurations, PA15 maps to TIM2_CH1 (timer index 2) as defined in timer_stm32h7xx.c. When used for GYRO_CLKIN functionality, it's recommended to use the macro name GYRO_1_CLKIN_PIN in TIMER_PIN_MAPPING for consistency with other pin definitions.

Applied to files:

  • configs/SPEEDYBEEF435AIOELRS/config.h
📚 Learning: 2025-07-03T04:33:57.480Z
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-03T04:33:57.480Z
Learning: Always verify that the `BOARD_NAME` define in config.h files exactly matches the directory name where the config file is located. For example, if the config file is in configs/AXISFLYINGF7AIO/config.h, then the BOARD_NAME should be defined as "AXISFLYINGF7AIO". This ensures proper board identification and configuration loading in Betaflight.

Applied to files:

  • configs/SPEEDYBEEF435AIOELRS/config.h
📚 Learning: 2025-08-26T14:26:11.863Z
Learnt from: haslinghuis
PR: betaflight/config#883
File: configs/HGLRCF435_AIO/config.h:50-58
Timestamp: 2025-08-26T14:26:11.863Z
Learning: For AT32F435 in Betaflight, UART4 supports multiple pin options including PH2 (UART4_RX) and PH3 (UART4_TX) with GPIO_MUX_8, as confirmed in the official Betaflight codebase at src/platform/AT32/serial_uart_at32f43x.c. The AT32 platform has broader pin support than initially apparent from basic searches.

Applied to files:

  • configs/SPEEDYBEEF435AIOELRS/config.h
🔇 Additional comments (12)
configs/SPEEDYBEEF435AIOELRS/config.h (12)

26-28: BOARD_NAME and MANUFACTURER_ID look correct.

  • BOARD_NAME matches directory.
  • MANUFACTURER_ID is 4 chars (SPBE).

29-37: Confirm barometer presence (DPS310).

Many AIO ELRS boards ship without a baro. If DPS310 isn’t physically present, drop USE_BARO/USE_BARO_DPS310 to avoid probing overhead.


39-43: Motor pad pins: verify timer suitability.

PB6/PB7/PB0/PB1 are plausible, but please confirm their timer channels align with TIMER_PIN_MAPPING entries below for proper DSHOT+DMA.


57-63: SPI1 + gyro lines look standard; verify PA15 for EXTI.

PA15 as GYRO_1_EXTI_PIN is common; just confirm the INT line is indeed on PA15 on production boards.


64-68: Flash on SPI2 with CS=PC13: confirm electrical suitability.

PC13 (low-drive, slower slew on many MCUs) is usually OK for CS, but please confirm signal integrity with W25Q128 at your SPI clock.


69-74: ADC/VBAT/current and beeper/LED pins: LGTM.

PA0/PA1 for ADCs and beeper inversion match common designs.


89-94: I2C instances and gyro/flash instances: LGTM.

I2CDEV_2 for BARO/MAG and SPI1/SPI2 instances are consistent with the pin defines.


95-101: Defaults: blackbox/DSHOT/meter sources look fine; confirm current scale.

800 is plausible but board-specific. Please confirm shunt value and amplifier gain.


102-103: SERIALRX_UART port mapping verified
UART5_RX_PIN is PB8 and UART5_TX_PIN is PB9, matching SERIALRX_UART = SERIAL_PORT_UART5.


44-53: Verify AT32F43x UART pin assignments

  • UART1 (PA9/PA10) is standard.
  • UART2 RX-only on PA3 – ensure this is intentional.
  • UART5 (PB9/PB8) and UART7 (PB4/PB3) – confirm these pairs are supported by the AT32F43x UART implementation (src/platform/AT32/serial_uart_at32f43x.c in the main Betaflight repo).
  • Verify that SERIAL_PORT_UART5 and SERIAL_PORT_UART7 identifiers exist in the serial_port_identifier_e enum (src/main/io/serial.h in the main Betaflight repo).

84-87: Verify ADC1_DMA_OPT mapping
I couldn’t locate the DMA option lookup table in this repository; please confirm that setting ADC1_DMA_OPT to 11 is valid for ADC1 on the AT32F435 per the Betaflight DMA reference.


75-83: Verify timer channels, DMA resources and GYRO_1_CLKIN mapping (manual check required)

Could not locate AT32 timer/DMA hardware tables in the repo to fully verify; manual confirmation required:

  • Confirm MOTOR1–4 assignments in configs/SPEEDYBEEF435AIOELRS/config.h (TIMER_PIN_MAP around lines 75–83) — motors use timer indices 1 and 2. Ensure those timer/DMA streams do not conflict with LED_STRIP (TIMER_PIN_MAP entry for LED_STRIP_PIN -> timer 1 ch6) or SPI2 (SPI2_SCK PB13 / SPI2_SDI PB14) DMA usage.
  • Confirm LED_STRIP timer/channel choice uses a DMA stream separate from SPI2/blackbox SPI so LED updates won’t steal SPI DMA.
  • Confirm GYRO_1_CLKIN_PIN (PA2, defined in the same config) is mapped to a timer channel that supports external clock / input-capture on the target AT32 MCU.

If you want automated validation, point me to the platform timer table (timer_*.c or src/platform/AT32/ timer files) and I will re-run checks.

@kedeng kedeng force-pushed the SPEEDYBEEF435AIOELRS branch from 691f662 to 1203f06 Compare September 8, 2025 09:44
@haslinghuis haslinghuis requested a review from ot0tot September 8, 2025 15:32
Comment on lines 100 to 101
#define DEFAULT_CURRENT_METER_SCALE 215
#define DEFAULT_CURRENT_METER_OFFSET -12390
Copy link
Contributor

Choose a reason for hiding this comment

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

Again, these values do not make sense based on the schematic.

Copy link
Contributor Author

@kedeng kedeng Sep 20, 2025

Choose a reason for hiding this comment

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

I confirmed the schematic with our hardware, and the load resistor values differ from those during the review. The value changed from 75K to 100K, and we are using 100K in our production version. So I delete DEFAULT_CURRENT_METER_OFFSET and change DEFAULT_CURRENT_METER_SCALE to 250.

Below is our calculation process:

INA139NA Output Voltage (V_out):

  • R_shunt = 0.25 mΩ = 0.00025 Ω (two 0.5 mΩ resistors in parallel equal 0.25 mΩ)
  • INA139NA gain G = R34 / 1 kΩ = 100 kΩ / 1 kΩ = 100
  • V_shunt = I_sense × R_shunt = I_sense × 0.00025
  • V_out = G × V_shunt = 100 × (I_sense × 0.00025) = 0.025× I_sense (unit: V, if I_sense is in A)

Betaflight Current Calculation Formula:

Current(Amps) = (ADC (mV) / amperage_meter_scale * 10) + (amperage_meter_offset / 1000)

When amperage_meter_offset = 0:

Current(Amps) = ADC (mV) / amperage_meter_scale * 10

Therefore,

amperage_meter_scale = (ADC (mV) * 10) / Current(Amps)

Relationship between ADC Value and V_out:

ADC (mV) = V_out × 1000 = 0.025× I_sense × 1000 = 25 × I_sense (mV)

Substitute into the formula:

amperage_meter_scale = (ADC (mV) * 10) / Current(Amps)
= (25 × I_sense) * 10 / I_sense
= 250

@ot0tot
Copy link
Contributor

ot0tot commented Sep 9, 2025

@kedeng PC15 is defined as ELRS-PW_SWITCH. Does this need a PINIO assignment? Should this be high by default? Why was this included?

@kedeng
Copy link
Contributor Author

kedeng commented Sep 10, 2025

@kedeng PC15 is defined as ELRS-PW_SWITCH. Does this need a PINIO assignment? Should this be high by default? Why was this included?

The original design was to switch to external ELRS through PC15. But the updated version has removed external ELRS support, therefore this pin is no longer used.

@kedeng kedeng requested a review from ot0tot September 20, 2025 16:31
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.

3 participants