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

feat: Flysky PL18 Support #4105

Merged
merged 57 commits into from
Dec 5, 2023
Merged

feat: Flysky PL18 Support #4105

merged 57 commits into from
Dec 5, 2023

Conversation

richardclli
Copy link
Collaborator

@richardclli richardclli commented Sep 25, 2023

Based on this PR:
#4012

Support of Flysky PL18 with the hardware mod described in here:
https://github.com/EdgeTX/edgetx/wiki/PL18-Hardware-Mod-for-Complete-EdgeTX-Support

Fixes #4380

@richardclli richardclli added this to the 2.10 milestone Sep 25, 2023
@richardclli richardclli marked this pull request as draft September 25, 2023 02:47
@raphaelcoeffic raphaelcoeffic force-pushed the fs_pl18-fatfs-spi-flash branch 2 times, most recently from 10800e9 to cf4a336 Compare September 25, 2023 07:49
@raphaelcoeffic raphaelcoeffic force-pushed the fs_pl18-fatfs-spi-flash branch 3 times, most recently from 8aa7306 to 06925b7 Compare September 26, 2023 16:40
@raphaelcoeffic raphaelcoeffic changed the base branch from main to fatfs-spi-flash September 26, 2023 16:47
@richardclli
Copy link
Collaborator Author

@raphaelcoeffic I have made an internal MPM for PL18 using the internal spare UART7 connector, don't breaks it.

@raphaelcoeffic
Copy link
Member

@raphaelcoeffic I have made an internal MPM for PL18 using the internal spare UART7 connector, don't breaks it.

Ah ok! Maybe we should have some compilation parameter for that. Currently it's not really easy to understand how that works.

@richardclli
Copy link
Collaborator Author

richardclli commented Sep 28, 2023

I will add the information in the mod page this weekend. And opensource the internal MPM design. The current build will only breaks Risto's PL18EV mod. He used the UART7's pin and DAC pin for the gimbals.

@rotorman Can you see if you can figure out a way to support the EV as well based on this working mod?

@rotorman
Copy link
Member

Not as DAC, but ADC. I used DAC pin for audio. I cannot find any further analog pin of STM32F429BIT6 that I could use for Paladin EV stick ends (need 4 additional channels, 2 for each stick - one for the stick end pot, one for the stick end both switches that output a combined signal on an analog pin).

@richardclli
Copy link
Collaborator Author

Not as DAC, but ADC. I used DAC pin for audio. I cannot find any further analog pin of STM32F429BIT6 that I could use for Paladin EV stick ends (need 4 additional channels, 2 for each stick - one for the stick end pot, one for the stick end both switches that output a combined signal on an analog pin).

So the UART7 is the only option for you then. So only need to support 2 config: 1. PL18 with optional INT module, or 2 PL18EV with no INT module.

@richardclli richardclli force-pushed the fs_pl18-fatfs-spi-flash branch 2 times, most recently from 225da1c to e50bb0f Compare October 6, 2023 14:46
@richardclli richardclli marked this pull request as ready for review October 7, 2023 11:04
@richardclli
Copy link
Collaborator Author

This PL18 branch is quite stable, I used for flying for some time already.
@rotorman see if you can utilize this branch to make your PL18EV works as well with some options and we can finalize it for merging.

@rotorman
Copy link
Member

rotorman commented Oct 7, 2023

IMO the decision depends on the amount of users using or to be using in the future of one or the other option and that can give clues in order to decide if the main line of branch should either support optional custom internal MPM or support PL18EV stick end controls.

@richardclli
Copy link
Collaborator Author

richardclli commented Oct 7, 2023

I know a few users in China managed to made the internal MPM PL18 mod from my design files. It seems fun to them anyway. @rotorman Could you please add PL18EV part to the mod page for some others who are interested to work it out to give it a try? For myself, I may mod my PL18EV according to your information as well.

Base automatically changed from fatfs-spi-flash to main October 13, 2023 09:51
@richardclli richardclli self-assigned this Oct 14, 2023
Copy link
Member

@pfeerick pfeerick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On finally reviewing all the code for this there are some changes I'm not so happy with... i.e. use of PCB defines when a feature flag could have done. But since it was mostly the NV14 that was guilty of that and you've just added the PL18 to the mix, I will do a followup PR to try and clean most of that up instead of hold this up.

@pfeerick pfeerick merged commit cc17046 into main Dec 5, 2023
42 checks passed
@richardclli
Copy link
Collaborator Author

Yes, indeed. Let me know if you need any help.

On finally reviewing all the code for this there are some changes I'm not so happy with... i.e. use of PCB defines when a feature flag could have done. But since it was mostly the NV14 that was guilty of that and you've just added the PL18 to the mix, I will do a followup PR to try and clean most of that up instead of hold this up.

@rotorman
Copy link
Member

rotorman commented Dec 6, 2023

PL18 and PL18EV could be added also to https://github.com/EdgeTX/edgetx/blob/main/tools/boards.py

@pfeerick
Copy link
Member

pfeerick commented Dec 6, 2023

Do we even know what that file is used for, or is it a legacy file that should be bumped off? If not, it's missing more than a few boards, not just the PL18 🤭

wimalopaan pushed a commit to wimalopaan/edgetx that referenced this pull request Dec 6, 2023
Co-authored-by: raphaelcoeffic <[email protected]>
Co-authored-by: rotorman <[email protected]>
Co-authored-by: Xy201207 <[email protected]>
Co-authored-by: Peter Feerick <[email protected]>
ulfhedlund added a commit to ulfhedlund/edgetx that referenced this pull request Dec 8, 2023
ulfhedlund added a commit to ulfhedlund/edgetx that referenced this pull request Dec 8, 2023
pfeerick pushed a commit to ulfhedlund/edgetx that referenced this pull request Dec 12, 2023
pfeerick pushed a commit to ulfhedlund/edgetx that referenced this pull request Dec 12, 2023
@pfeerick pfeerick deleted the fs_pl18-fatfs-spi-flash branch February 28, 2024 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The RGB LED function is missing in the Special Functions of the MT12.
4 participants