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: Ext module not powered when using SBUS or CPPM trainer #4167

Merged
merged 2 commits into from
Oct 18, 2023
Merged

fix: Ext module not powered when using SBUS or CPPM trainer #4167

merged 2 commits into from
Oct 18, 2023

Conversation

bug400
Copy link
Contributor

@bug400 bug400 commented Oct 5, 2023

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).

@pfeerick pfeerick changed the title Fix for #3634 (ext module not powered when using trainer/sbus or trai… fix: Ext module not powered when using SBUS or CPPM trainer Oct 6, 2023
@pfeerick pfeerick changed the base branch from 2.9 to main October 6, 2023 04:06
@pfeerick pfeerick changed the base branch from main to 2.9 October 6, 2023 04:06
@pfeerick pfeerick added the bug/regression ↩️ A new version of EdgeTX broke something label Oct 6, 2023
@pfeerick pfeerick added this to the 2.9.x milestone Oct 6, 2023
@pfeerick
Copy link
Member

pfeerick commented Oct 6, 2023

This should have been targeted against the main branch, but will be messy to change, so can be cherry-picked into main afterwards.

@raphaelcoeffic raphaelcoeffic changed the base branch from 2.9 to main October 11, 2023 14:37
@raphaelcoeffic
Copy link
Member

This should have been targeted against the main branch, but will be messy to change, so can be cherry-picked into main afterwards.

I force-pushed the cherry-picked code now based on main onto his branch ;-)

@pfeerick pfeerick modified the milestones: 2.9.x, 2.9.2 Oct 18, 2023
@pfeerick pfeerick merged commit 1b789ca into EdgeTX:main Oct 18, 2023
@bug400 bug400 deleted the fix-trainer-sbus-extmodule-power-291 branch November 13, 2023 09:44
MRC3742 pushed a commit to MRC3742/edgetx that referenced this pull request Dec 22, 2023
@BergWolfRC
Copy link

Thanks for providing this fix.
On my TX1S MKII with EdgeTX 2.9.1 I encountered specifically the problem that the external module was not powered when using CPPM trainer.
Now, with EdgeTX 2.9.4 installed I do get the power for the external module in this case.
However the PPM signal of the receiver connected to the external module bay (PPM via Pin 2) is not recognized by the TX even if trainer special function is enabled (set to sticks). Could this be another side effect of the changes in the code?
I am using a cm410X as receiver in the trainer tx for receiving the student signals (servo attached to the RX does move).

@mha1
Copy link
Contributor

mha1 commented Feb 23, 2024

I can confirm this, see #4672

@BergWolfRC
Copy link

thanks for double checking, confirming and creating the follow up issue!
You guys rock!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/regression ↩️ A new version of EdgeTX broke something
Projects
None yet
5 participants