-
-
Couldn't load subscription status.
- Fork 430
feat(nb4p): hardware drivers enhancements #6661
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
base: main
Are you sure you want to change the base?
Conversation
- Uncomment and fix SW3/SW4 support in switch driver - Add improved ADC thresholds with hysteresis (400/3500 vs 512/3584) - Fix multiplexed switch detection on ADC_RAW2 channel - Add comprehensive hardware mapping documentation - Prepare SW4 support for future hardware revisions Resolves critical bug where SW3 was completely non-functional. Improves reliability by preventing false switch triggers.
…rmediate positions - Add robust ADC thresholds with hysteresis for reliable trim detection - Implement intermediate trim positions support - Add comprehensive documentation and hardware mapping comments - Improve debouncing logic for stable trim state detection - Align with EdgeTX hardware driver standards
|
Can you describe what do you want to achieve in this PR? Did you modded a NB4+ and want to add sone features? |
|
Hello @richardclli, This PR improves hardware input detection for the stock FlySky NB4+ (no hardware mods). The changes are not yet validated on real NB4+ hardware (My NB4+ still need HW rework waiting for some parts). Let me know your thoughts |
|
I did not test your code yet. But the original code is to map sw1a and sw1b to enter and exit and leaves sw2 and sw3 as normal temporary switches. Why I bring up the discussion is because I did the nb4p port just for fun and it need some mod on the tx module to make it useful. I am still working on the tx module part. It will be interesting if someone want to work out more about the nb4p together. So wanna see what plan you have in mind and see what we can achieve together. |
|
@richardclli I can definitely help, I have ordered a while ago a NB4+ as spare radio and unfortunately after unpacking it's CN only and Flysky didn't yet came with a solution for me. I'm still trying to find all HW parts to rework my NB4+ to test the SW. Unfortunately I'm unable to find them all in same store so the shipping is way too high, I need to figure this out. Feel free to share your current status and if you see places where I can help. I will let you know if I find some solutions on missing parts to enable me testing all mods. Have a great day |
|
@richardclli can you please let me know the current status of the TX radio and what needs to be done I will have a look also if you to have some documentation on the schematics and mabe chips used inside it can be usefull to me. |
|
Maybe you can find me at our discord channel and we may discuss more there.
|
Sure what is your nick there ? Mine is Guilhem23 |
|
@richardclli Can you let me know if you want this PR, changes made, or if it is not suitable. |
|
@pfeerick please wait for this one as I need to make the HW rework and try it out. I did this modification blindly and I must try it out |
I think it is not suitable, as he overrides some of my definitions. Will discuss with him to see what is better. |
|
No problem, just let me know when I should pay attention to this PR again ;) |
Motivation
Fix critical bugs and improve reliability of NB4+ hardware drivers.
Changes
Validation
Notes
ADC thresholds are based on hardware measurements. If needed, can be made configurable in future PRs.