Disable DTR for megas in general, enable it for only the one that requires it.#2968
Draft
tigert wants to merge 4 commits into
Draft
Disable DTR for megas in general, enable it for only the one that requires it.#2968tigert wants to merge 4 commits into
tigert wants to merge 4 commits into
Conversation
…e projects currently. The reason DTR is enabled, is because one variant of Arduino Mega needs it. - Disable DTR for all Mega boards - Enable DTR specifically for the Mega wth Atmega16U2 that needs it
Contributor
Author
|
marked this as draft so we can give it some testing first. |
Contributor
There was a problem hiding this comment.
Pull request overview
Splits the Arduino Mega board definition so that only the Atmega16U2-based Mega variant (VID_2341&PID_0042) keeps DtrEnable: true, while all other Mega boards (sharing CH340 chips with ESP32) have DTR disabled to avoid breaking ESP32-based custom device projects.
Changes:
- Set
DtrEnabletofalseinarduino_mega.board.jsonand remove the^VID_2341&PID_0042hardware ID from its list. - Add a new
arduino_mega_dtrenable.board.jsonboard definition targeting only^VID_2341&PID_0042withDtrEnable: true. - Register the new board JSON in the csproj so it is copied to the output directory.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/MobiFlightConnector/Boards/arduino_mega.board.json | Disables DTR and removes the Atmega16U2 Mega VID/PID from the generic Mega definition. |
| src/MobiFlightConnector/Boards/arduino_mega_dtrenable.board.json | New board file isolating the Atmega16U2 Mega variant with DTR enabled. |
| src/MobiFlightConnector/MobiFlightConnector.csproj | Includes the new board JSON as content with PreserveNewest. |
|
Build for this pull request: |
|
Build for this pull request: |
|
Build for this pull request: |
|
Build for this pull request: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enabling DTR for all boards breaks ESP32 based custom device projects currently. The reason DTR is enabled, is because one variant of Arduino Mega needs it. Most megas and also esp32 use CH340 that share the same VID & PID, but luckily the affected Arduino Mega variant uses different ID's.