-
-
Notifications
You must be signed in to change notification settings - Fork 363
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: Ext module not powered when using SBUS or CPPM trainer #4167
fix: Ext module not powered when using SBUS or CPPM trainer #4167
Conversation
This should have been targeted against the main branch, but will be messy to change, so can be cherry-picked into |
I force-pushed the cherry-picked code now based on |
Thanks for providing this fix. |
I can confirm this, see #4672 |
thanks for double checking, confirming and creating the follow up issue! |
Fixes #3634, fixes #2009
Summary of changes:
Power on/off of the external module is now in the module init/deinit code. Since trainer/sbus and trainer/ccpm are no modules, power on/off is not handled for that mode of operation. Therefore, moduleSetPower calls were added to the init/deinit subroutines for trainer/sbus and trainer/cppm. There is also a fix in stop_trainer_module_sbus() where sbus_trainer_mod_st has to be set to nullptr after deiniztialization of the sbus port.
Tested on QX7-ACCESS with edgetx 2.9.1 with mode trainer/sbus (with SBUS data source and power pin voltage check) and with mode trainer/sbus (power pin voltage check only, I do not have a ccpm data source).