fix: undesired MPM protocol selection changes #3444
Merged
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.
Fixes #3434
Summary of changes:
This fixes the shortcomings of PR #3355 where ACCESS receiver name data was corrected to fix #3273
Added checking module types of the currently loaded model. If there is no PXX2 module selected there is nothing to correct.
The problem finder confirmed this to fix his problem.
Note of shame:
Dummy me created a major mess with #3355 which showed it's ugly face in 2.8.2 (#3434) and is also present in 2.9. My fudge up causes under very specific conditions (which makes it look random) an index shift to Multi protocols (firmware and simulator). The reason is writing to the PXX2 module data struct via PXX2 union without checking if PXX2 is actually an active module of the loaded model. This semi-randomly overwrites parts of the active modules data. For Multi this can result in an index shift in in the .yml file of the active model. I apologize for the inconvenience.
@pfeerick as this is ugly for 2.8.2. can we think about 2.8.3 which should include at least this PR and the fix for crashing Companion if Multi is selected as internal or external module (#3426).