Skip to content

Conversation

haslinghuis
Copy link
Member

@haslinghuis haslinghuis commented Sep 26, 2025

Summary by CodeRabbit

  • New Features
    • Added support for the QMC5883P magnetometer, allowing users to configure and use this sensor alongside existing magnetometer options.
    • The new sensor is available in selection menus and works with existing data display and calibration flows without additional steps.
    • Expands hardware compatibility, improving coverage for devices relying on magnetic heading, orientation, and navigation features.

@haslinghuis haslinghuis added this to the 2025.12 milestone Sep 26, 2025
@haslinghuis haslinghuis self-assigned this Sep 26, 2025
Copy link
Contributor

coderabbitai bot commented Sep 26, 2025

Walkthrough

Adds the "QMC5883P" magnetometer identifier to the mag elements list in sensorTypes within src/js/sensor_types.js. No other logic, structure, or exports changed.

Changes

Cohort / File(s) Summary of Changes
Sensor types registry update
src/js/sensor_types.js
Added "QMC5883P" to the magnetometer (mag) elements list. No other modifications.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description only contains a brief note to keep in sync with an upstream PR and does not follow the repository’s description template, which requires a structured explanation of changes, testing steps, and other required details. Please update the description to follow the repository template by removing instructional boilerplate, providing a summary of changes, testing instructions, issue references, and any other required sections outlined in the template.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The title “Add QMC5883P” directly reflects the primary change of introducing the QMC5883P magnetometer option in sensor_types.js, making it concise, clear, and focused on the main update.
✨ 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 10d6584 and 0e70721.

📒 Files selected for processing (1)
  • src/js/sensor_types.js (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: haslinghuis
PR: betaflight/betaflight-configurator#4579
File: src/js/sensor_types.js:1-1
Timestamp: 2025-08-27T19:24:38.344Z
Learning: In src/js/sensor_types.js, the import statement `import { removeArrayElement, addArrayElement, addArrayElementsAfter } from "./utils/array";` is correct and working properly. The addArrayElement function call for adding "VIRTUAL" to GPS elements is properly guarded against duplicates.
Learnt from: haslinghuis
PR: betaflight/betaflight-configurator#4485
File: src/js/sensor_types.js:96-99
Timestamp: 2025-05-24T15:12:50.241Z
Learning: In src/js/sensor_types.js, the sonar element selection UI is only displayed when firmware version >= API_VERSION_1_47, so sonar sensor types can be added directly to the static elements array without requiring additional version guards.
Learnt from: haslinghuis
PR: betaflight/betaflight-configurator#4579
File: src/js/sensor_types.js:1-1
Timestamp: 2025-08-27T19:24:38.344Z
Learning: In src/js/sensor_types.js, all array utility imports (removeArrayElement, addArrayElement, addArrayElementsAfter) from "./utils/array" are correct and functional. The addArrayElement usage for GPS elements is properly implemented and safe.
📚 Learning: 2025-05-24T15:12:50.241Z
Learnt from: haslinghuis
PR: betaflight/betaflight-configurator#4485
File: src/js/sensor_types.js:96-99
Timestamp: 2025-05-24T15:12:50.241Z
Learning: In src/js/sensor_types.js, the sonar element selection UI is only displayed when firmware version >= API_VERSION_1_47, so sonar sensor types can be added directly to the static elements array without requiring additional version guards.

Applied to files:

  • src/js/sensor_types.js
📚 Learning: 2025-08-27T19:24:38.344Z
Learnt from: haslinghuis
PR: betaflight/betaflight-configurator#4579
File: src/js/sensor_types.js:1-1
Timestamp: 2025-08-27T19:24:38.344Z
Learning: In src/js/sensor_types.js, the import statement `import { removeArrayElement, addArrayElement, addArrayElementsAfter } from "./utils/array";` is correct and working properly. The addArrayElement function call for adding "VIRTUAL" to GPS elements is properly guarded against duplicates.

Applied to files:

  • src/js/sensor_types.js
📚 Learning: 2025-08-27T19:24:38.344Z
Learnt from: haslinghuis
PR: betaflight/betaflight-configurator#4579
File: src/js/sensor_types.js:1-1
Timestamp: 2025-08-27T19:24:38.344Z
Learning: In src/js/sensor_types.js, all array utility imports (removeArrayElement, addArrayElement, addArrayElementsAfter) from "./utils/array" are correct and functional. The addArrayElement usage for GPS elements is properly implemented and safe.

Applied to files:

  • src/js/sensor_types.js
🔇 Additional comments (1)
src/js/sensor_types.js (1)

80-91: Addition aligns configurator with firmware support.

Thanks for keeping the mag options synced; the new QMC5883P entry slots in cleanly with existing enumerations.


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 moved this to App in 2025.12.0 Sep 26, 2025
Copy link

Copy link
Contributor

Preview URL: https://pr4634.betaflight-app.pages.dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: App
Development

Successfully merging this pull request may close these issues.

2 participants