Skip to content

Conversation

@VitroidFPV
Copy link
Member

@VitroidFPV VitroidFPV commented Oct 30, 2025

Please don't review yet, just a basic implementation of user-reported VID/PID on an iFlight F745 AIO. Need working build to try

Summary by CodeRabbit

  • New Features
    • Added support for a new serial USB device, expanding device compatibility for the application.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 30, 2025

Walkthrough

The PR adds a new serial USB device entry to the serialDevices array in src/js/protocols/devices.js with vendor ID 1161 and product ID 57549, enabling recognition of this specific device.

Changes

Cohort / File(s) Summary
Device Entry Addition
src/js/protocols/devices.js
Added new USB serial device object { vendorId: 1161, productId: 57549 } to the serialDevices array

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Suggested labels

RN: IMPROVEMENT

Suggested reviewers

  • nerdCopter
  • haslinghuis

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
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.
Description Check ❓ Inconclusive The pull request description is vague and minimal, providing limited context about the change. While it mentions the change is for a user-reported VID/PID on an iFlight F745 AIO board, it does not explain the specific problem being solved, does not link to any related issues using the "Fixes #" format as suggested in the template, and does not provide sufficient detail for reviewers to understand the context. Additionally, the author explicitly states "Please don't review yet", indicating the pull request is not ready for review. The description does not follow the repository's template structure and lacks the information typically expected for proper PR documentation. The author should provide a more complete pull request description that includes the specific problem or issue being addressed, references to any related GitHub issues using the "Fixes #" format, and sufficient detail about why this VID/PID entry is needed for the iFlight F745 AIO board. The description should also clearly indicate when the pull request is ready for review, as the current message suggests this is still work-in-progress.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "Experimental Fix: Add reported non-workig VID/PID" is directly related to the main change in the changeset, which adds a new serial USB device entry (vendorId: 1161, productId: 57549) to the serialDevices array. The title clearly indicates that a VID/PID entry is being added to address a reported issue. The title is concise and specific enough that a teammate scanning history would understand the primary change is adding a VID/PID entry for device support. The only minor issue is a typo ("non-workig" instead of "non-working"), but this does not impact clarity or relevance.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 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.

@sonarqubecloud
Copy link

@github-actions
Copy link
Contributor

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)
src/js/protocols/devices.js (1)

58-58: Experimental entry looks syntactically correct.

The new device entry follows the existing format and is clearly marked as experimental. For consistency with other vendors, consider adding an entry for VID 1161 to the vendorIdNames object (lines 78-85), though this is optional since VID 10473 is also missing a name entry.

If you'd like to add the vendor name for better device identification in the UI:

 export const vendorIdNames = {
+    1161: "Foxconn / Hon Hai",
 };
📜 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 93db9fa and f4ef4bf.

📒 Files selected for processing (1)
  • src/js/protocols/devices.js (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: haslinghuis
PR: betaflight/betaflight-configurator#4510
File: src/js/msp.js:384-391
Timestamp: 2025-09-19T20:41:44.286Z
Learning: When fixing MSP duplicate handling in Betaflight Configurator, avoid complex changes to callback resolution mechanisms as they can break tab switching functionality. Simple duplicate detection based on code and payload size is safer than complex requestKey-based approaches.
Learnt from: haslinghuis
PR: betaflight/betaflight-configurator#4379
File: src/js/protocols/TauriSerial.js:203-259
Timestamp: 2025-10-25T21:16:32.474Z
Learning: In TauriSerial (src/js/protocols/TauriSerial.js), the requestPermissionDevice() method is not needed and not invoked. Tauri automatically discovers serial devices through the constructor's loadDevices() and startDeviceMonitoring() calls, bypassing the browser permission model that WebSerial requires. Devices are auto-detected via a 1-second polling interval without user permission prompts.
Learnt from: blckmn
PR: betaflight/betaflight-configurator#4521
File: src/js/protocols/WebSerial.js:148-151
Timestamp: 2025-06-19T22:13:09.136Z
Learning: In WebSerial.js, there's a timing issue where the cached `this.ports` array doesn't immediately reflect newly permitted devices after `requestPermissionDevice()` completes. The `getDevices()` method needs to refresh the device list from the browser API to return accurate data immediately following a permission request and user acceptance.
📚 Learning: 2025-06-19T22:13:09.136Z
Learnt from: blckmn
PR: betaflight/betaflight-configurator#4521
File: src/js/protocols/WebSerial.js:148-151
Timestamp: 2025-06-19T22:13:09.136Z
Learning: In WebSerial.js, there's a timing issue where the cached `this.ports` array doesn't immediately reflect newly permitted devices after `requestPermissionDevice()` completes. The `getDevices()` method needs to refresh the device list from the browser API to return accurate data immediately following a permission request and user acceptance.

Applied to files:

  • src/js/protocols/devices.js
📚 Learning: 2025-10-25T21:16:32.474Z
Learnt from: haslinghuis
PR: betaflight/betaflight-configurator#4379
File: src/js/protocols/TauriSerial.js:203-259
Timestamp: 2025-10-25T21:16:32.474Z
Learning: In TauriSerial (src/js/protocols/TauriSerial.js), the requestPermissionDevice() method is not needed and not invoked. Tauri automatically discovers serial devices through the constructor's loadDevices() and startDeviceMonitoring() calls, bypassing the browser permission model that WebSerial requires. Devices are auto-detected via a 1-second polling interval without user permission prompts.

Applied to files:

  • src/js/protocols/devices.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant