-
-
Notifications
You must be signed in to change notification settings - Fork 361
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(AFHDS3): Sync UI with Flysky AFHDS3 module stored settings #3501
Conversation
It would need some way to reset the flag otherwise the UI will keep updating. It think it would be better to just store the get_tmr10ms() when a change is made to the module that needs a UI update. |
PR #3502 has code to update the module window if the module refresh time changes. You should be able to merge that PR into your branch. Note: I have no way to test this so I can't guarantee it will work. Also, to avoid unnecessary updates, the module code should take care to only update the 'lastModuleUpdatedTime' value when the underlying module data has actually changed. |
Thank you, I will check and see later when I have access to my radios. |
This appears to be working for EL18 - changing receiver ID now triggers a UI refresh when different receivers have different settings, which also means the RF mode (Fast 8Ch, Routine 18Ch etc) is updating to correctly reflect different receiver profiles. |
Nice, now need to check how the change of options can update a connected receiver. |
If it truely is runtime, and you refer to the options like servo frequency, purpose of the NP# ports, etc, that update action could perhaps be triggered as you exit the screen - which I think is similar to how R9M Access, ISRM, etc do it. |
I think I will try to add hooks to the UI that will mark the config as dirty and update the config during normal operation cycles. |
3baf692
to
3980f6a
Compare
@philmoz seems the refreahing logic will stop other modules from refreshing properly, e.g. MPM |
I don't understand - can you provide more details on what is happening. |
The MPM status is not refreshed with this change i.e. MPM version no. is not shown, just white. I found that MPM has timestamp to control the refresh. https://github.com/EdgeTX/edgetx/blob/main/radio/src/telemetry/multi.cpp#L254-L257 Let me check the code of other modules first. I think we need a unified mechanism to control options refresh in UI. |
@philmoz I finally got it right. Overriding checkEvents need to call super class method otherwise there will be something missing for the children. edgetx/radio/src/gui/colorlcd/flysky_settings.cpp Lines 94 to 99 in 764ec3e
Thanks for your code that enlighten me. |
81d08db
to
bd6acd9
Compare
137cfca
to
f94559b
Compare
Fix simulator crash issues related to FlySky module.
Now the settings can change online. Need some time for people to test. Flysky will help to test as well. |
@raphaelcoeffic I have change some state flow in the AFHDS3 state machine, please help me to review to see if there maybe any loop holes. |
@raphaelcoeffic @philmoz Any more reviews and comments? BTW, I have delivered firmware with this PR for users in China. Up to now, it seems the changes works well and stable. |
Nothing obvious leaps out at me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is more work to be done for AFHDS2/3, but this PR seems to do what it says on the tin ;) Settings saved to file now also survive a read/write pass through Companion. They cannot be fully configured with Companion yet, as it seems we need to purge FRM302 related entries before we can fully match the FRM303 in Companion... but one problem at a time.
Fixes #3491, fixes #3477 (reworked), fixes #3682
Summary of changes: