-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Fix telemetry for Spektrum/SRXL #13814
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 telemetry for Spektrum/SRXL #13814
Conversation
haslinghuis
commented
Aug 11, 2024
- fixes Spektrum serial Rx telemetry not working with BF 4.4. #12614
Do you want to test this code? You can flash it directly from Betaflight Configurator:
WARNING: It may be unstable. Use only for testing! |
src/main/target/common_pre.h
Outdated
@@ -330,6 +330,10 @@ | |||
#define USE_THRUST_LINEARIZATION | |||
#define USE_TPA_MODE | |||
|
|||
#if defined(USE_SERIALRX_SRXL2) && !defined(USE_SERIALRX_SPEKTRUM) |
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.
Is common_pre.h good place? it will be hard to modify in target.h.
But that would mean moving #ifdef USE_SERIALRX_SPEKTRUM (below) too and that would complicate things even mode.
src/main/target/common_pre.h
Outdated
#if defined(USE_SERIALRX_SRXL2) && !defined(USE_SERIALRX_SPEKTRUM) | ||
#define USE_SERIALRX_SPEKTRUM | ||
#endif | ||
|
||
#ifdef USE_SERIALRX_SPEKTRUM |
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.
Did you try this:
#ifdef USE_SERIALRX_SPEKTRUM | |
#if defined(USE_SERIALRX_SPEKTRUM) || defined(USE_SERIALRX_SRXL2) |
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.
Would work if we change it here too
betaflight/src/main/target/common_post.h
Lines 268 to 282 in f890287
// If USE_SERIALRX_SPEKTRUM was dropped by a target, drop all related options | |
#ifndef USE_SERIALRX_SPEKTRUM | |
#undef USE_SPEKTRUM_BIND | |
#undef USE_SPEKTRUM_BIND_PLUG | |
#undef USE_SPEKTRUM_REAL_RSSI | |
#undef USE_SPEKTRUM_VIRTUAL_RSSI | |
#undef USE_SPEKTRUM_RSSI_PERCENT_CONVERSION | |
#undef USE_SPEKTRUM_VTX_CONTROL | |
#undef USE_SPEKTRUM_VTX_TELEMETRY | |
#undef USE_TELEMETRY_SRXL | |
#endif | |
#if !defined(USE_CMS) || !defined(USE_TELEMETRY_SRXL) | |
#undef USE_SPEKTRUM_CMS_TELEMETRY | |
#endif |
Please fix #endif comments too |
Great work! With SERIALRX_SPEKTRUM now I'm having telemetry running with my Spektrum SPM4651t. |
* Fix telemetry for Spektrum/SRXL * Update after ledvinap review * Update comments
This reverts commit 04fe4b4.
This reverts commit eb7f8ee.
* rename dMin, remove D_MIN_GAIN_MAX * rename vars * fix logic * fix logic * Revert "fix tests" This reverts commit c518c9c. * Revert "add yaw and other adjustment cases" This reverts commit 2cacd4b. * Revert "fix unit test" This reverts commit 3d88f41. * Revert "fix D adjustments change dmax instead of D" This reverts commit 7ee4e7f. * Revert "Fix telemetry for Spektrum/SRXL (#13814)" This reverts commit 04fe4b4. * review adjustments and test fixes * Reapply "Fix telemetry for Spektrum/SRXL (#13814)" This reverts commit eb7f8ee. * fix logic * Apply suggestions from code review Co-authored-by: Jan Post <Rm2k-Freak@web.de> Co-authored-by: Mark Haslinghuis <mark@numloq.nl> * fix d_max slider --------- Co-authored-by: Jan Post <Rm2k-Freak@web.de> Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
backport to 4.5-maintenance? |
Agree for |