Skip to content

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

Merged
merged 3 commits into from
Aug 14, 2024

Conversation

haslinghuis
Copy link
Member

@haslinghuis haslinghuis added this to the 4.6 milestone Aug 11, 2024
@haslinghuis haslinghuis self-assigned this Aug 11, 2024
Copy link

Do you want to test this code? You can flash it directly from Betaflight Configurator:

  • Simply put #13814 (this pull request number) in the Select commit field of the Configurator firmware flasher tab (you need to Enable expert mode, Show release candidates and Development).

WARNING: It may be unstable. Use only for testing!

@haslinghuis
Copy link
Member Author

@@ -330,6 +330,10 @@
#define USE_THRUST_LINEARIZATION
#define USE_TPA_MODE

#if defined(USE_SERIALRX_SRXL2) && !defined(USE_SERIALRX_SPEKTRUM)
Copy link
Contributor

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.

#if defined(USE_SERIALRX_SRXL2) && !defined(USE_SERIALRX_SPEKTRUM)
#define USE_SERIALRX_SPEKTRUM
#endif

#ifdef USE_SERIALRX_SPEKTRUM
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you try this:

Suggested change
#ifdef USE_SERIALRX_SPEKTRUM
#if defined(USE_SERIALRX_SPEKTRUM) || defined(USE_SERIALRX_SRXL2)

Copy link
Member Author

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

// 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

@ledvinap
Copy link
Contributor

Please fix #endif comments too

@xs400dohc
Copy link

Great work! With SERIALRX_SPEKTRUM now I'm having telemetry running with my Spektrum SPM4651t.

@haslinghuis haslinghuis merged commit 04fe4b4 into betaflight:master Aug 14, 2024
24 checks passed
@haslinghuis haslinghuis deleted the fix-srxl-telemetry branch August 14, 2024 15:36
haslinghuis added a commit to haslinghuis/betaflight that referenced this pull request Aug 14, 2024
* Fix telemetry for Spektrum/SRXL

* Update after ledvinap review

* Update comments
blckmn pushed a commit that referenced this pull request Aug 15, 2024
Fix telemetry for Spektrum/SRXL (#13814)

* Fix telemetry for Spektrum/SRXL

* Update after ledvinap review

* Update comments
mituritsyn added a commit to mituritsyn/betaflight that referenced this pull request Sep 20, 2024
mituritsyn added a commit to mituritsyn/betaflight that referenced this pull request Sep 20, 2024
haslinghuis added a commit that referenced this pull request Sep 24, 2024
* 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>
@nerdCopter
Copy link
Member

backport to 4.5-maintenance?

@haslinghuis
Copy link
Member Author

Agree for #13947 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

Spektrum serial Rx telemetry not working with BF 4.4.
5 participants