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(SoarETX): Replace the way to identify the radio Switches #143

Merged
merged 1 commit into from
Apr 7, 2024

Conversation

frankiearzu
Copy link
Contributor

@frankiearzu frankiearzu commented Apr 7, 2024

Fixes #142
The way to find the switches worked in 2.9.4, but not in 2.10. Fixing it to a way that works for both.

The correction is for both version 1 (backward compatibility), and new v2.

The code for firmware 2.9.x (and before) was looking for a "trim" with name "Rl" to identify the "last" switch.. looks like is no longer there in 2.10.

Change the code to identify the switches using a pattern.

The way to find the switches worked in 2.9.4, but not in 2.10.  Fixing it to a way that works for both.
@pfeerick
Copy link
Member

pfeerick commented Apr 7, 2024

Yes, switch naming changing slightly with 2.10, so playing catchup with Lua now... i.e. same as in #140. The perils of hard-coded switch names... you guys should be asking for constants ;)

@pfeerick pfeerick merged commit 6899cfd into EdgeTX:master Apr 7, 2024
2 checks passed
@frankiearzu
Copy link
Contributor Author

Yes, LUA constants should be better, someone provided that code when I asked in Discord. The only thing that I notice was that I created a model in 2.10 using the template.. worked fine, then downgraded to 2.9.4.. all my special functions who was setup as "!1x" was replaced as "1s". Then I deleted the model, and created from scratch in 2.9.4 from the same templates.. everything ok. I guess moving back version in the model is not compatible.. but is expected that we only should support moving up.. not down.

@frankiearzu
Copy link
Contributor Author

Someone else tested my changes.. always good to have a second tester.
image

@frankiearzu frankiearzu deleted the SoarETX_v2.1-fixes branch April 7, 2024 23:25
@pfeerick
Copy link
Member

pfeerick commented Apr 7, 2024

Yes, that is the case... you can upgrade, but can't downgrade (i.e. the reason to keep backups)... settings will migrate forwards, but can't go backwards since older firmware doesn't know about newer firmware config format changes...

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.

SoarETX, Switches Screen not working in 2.10
2 participants