Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cpn): ensure hardware definitions are loaded when reading binary files #5037

Merged
merged 1 commit into from
May 24, 2024

Conversation

elecpower
Copy link
Collaborator

@elecpower elecpower commented May 19, 2024

Fixes #5034

Summary of changes:

  • force loading of board hardware definitions for each firmware checked
  • skip otx firmwares where fourcc is not unique and not a match for the current radio profile board eg X9D, X9D+ and X9D+ 2019. Assume you have only one radio of the group and it is your current profile. Risk that data is interpreted incorrectly ie corrupted or worse app crash. Would mainly affect devs. This issue goes back to OTX days.

@elecpower elecpower added companion Related to the companion software bug/regression ↩️ A new version of EdgeTX broke something labels May 19, 2024
@elecpower elecpower added this to the 2.10.1 milestone May 19, 2024
@elecpower elecpower requested a review from 3djc May 19, 2024 20:18
@3djc
Copy link
Collaborator

3djc commented May 20, 2024

Side comment fourcc was not meant to identify uniquely a radio, but more a data layout. Radios with exact same switch layout could share a fourcc, like the X9D series does. (in a way similar to what is done today with yaml_datastructs_128x64.cpp)

@elecpower
Copy link
Collaborator Author

Side comment fourcc was not meant to identify uniquely a radio, but more a data layout. Radios with exact same switch layout could share a fourcc, like the X9D series does. (in a way similar to what is done today with yaml_datastructs_128x64.cpp)

The json files for the X9D series vary in number of pots and switches. Whilst they may take up the same storage space (haven't checked) having the same fourcc makes it impractical to work out reliably which radio the file came from.

This is an issue in OTX too and soon the issue will be consigned to ETX history.

@pfeerick pfeerick changed the title fix(cpn): when reading binary files ensure hardware definitions are loaded fix(cpn): ensure hardware definitions are loaded when reading binary files May 24, 2024
@pfeerick pfeerick merged commit a13fc62 into main May 24, 2024
3 checks passed
@pfeerick pfeerick deleted the elecpower/cpn-fix-5034-crash-reading-bin branch May 24, 2024 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/regression ↩️ A new version of EdgeTX broke something companion Related to the companion software
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Companion opening some OpenTX dot bin files crashes the application
3 participants