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

sx driver, bug, handle non initialized gconfig #302

Closed
wants to merge 1 commit into from

Conversation

olliw42
Copy link
Owner

@olliw42 olliw42 commented Mar 6, 2025

this should account for the crash with diversity, #245

we had already two attempts to resolve,
https://github.com/olliw42/mLRS/tree/owpr-rfpower-antenna
#266

however, I've determined that the underlying "true" issue is that gconfig in the sx drivers is not initialized due to these lines https://github.com/olliw42/mLRS/blob/main/mLRS/CommonRx/mlrs-rx.cpp#L549-L550, which make the Startup() may not be called and gconfig thus not be set. The result is an acces to an undefined location.
Interesting enough that the issue, which is clearly a bug, never came up before.

One could have changed code such that Startup() is always called but only the sx not initialzed. I've opted for allowing gconfig to be non-initzialized. Not sure which approach is better, bith seem to me to do the same at the end of the day.

@jlpoltrack
Copy link
Collaborator

Test on F1 E28 Dual:

With Antenna1: No longer results in crash
With Antenna2: No longer results in crash, correct power and sensitivity reported

Looks good

@olliw42
Copy link
Owner Author

olliw42 commented Mar 7, 2025

THX

@olliw42 olliw42 closed this Mar 7, 2025
@olliw42 olliw42 deleted the owpr-rfpower-antenna2 branch March 7, 2025 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants