Disable DTR for megas in general, enable it for only the one that requires it. - #2968
Disable DTR for megas in general, enable it for only the one that requires it.#2968tigert wants to merge 6 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
|
marked this as draft so we can give it some testing first. |
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: |
|
Build for this pull request: |
|
We are currently applying a fix to all megas regardless of whether they need it or not. Yet if I understand correctly, the problem only seems to affect the megas that have the Atmega16U2 instead of CH340, or custom device projects with ESP32. I know @ccrawford has been using this fix for a while already. |
|
Build for this pull request: |
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.