tbs-fpv / freedomtx

FreedomTX custom firmware for Transmitters
GNU General Public License v2.0
60 stars 8 forks source link

External RF module unable to use packet rates >50hz #12

Closed wvarty closed 3 years ago

wvarty commented 3 years ago

Describe the bug When using the TBS external module adapter on the Tango 2, the RC data is only being transmitted from FreedomTX to the external module at 50Hz, regardless of how fast the module is requesting it.

The packet rate over the air will correctly operate at the desired RF rate, however the stick data is only ever being updated at 50hz.

See this video for a full demonstration of the problem: https://youtu.be/d7PEyGn55DM

To Reproduce Steps to reproduce the behavior:

  1. Connect an external module capable of rate >50hz to the Tango 2 (i.e. Crossfire micro or full sized)
  2. Under the model setup, select CRSF for the External RF
  3. Using the LUA script, set the external RX to use 150hz mode
  4. Log BB data using the RC_SMOOTHING_RATE debug mode, and observe the rate that stick inputs change at

Expected behavior RC data is updated at the same rate that the packets are being sent (i.e. 150hz).

Actual behavior RC data is updated at 50hz, regardless of the RF rate.

Screenshots If applicable, add screenshots to help explain your problem. 150hz-setup bb

General information

kamik2 commented 3 years ago

fixed on 1.23

pls update

juliannojungle commented 3 years ago

@kamik2 please help me to understand: does this means that the radio can talk to the module using CRSF protocol at 50Hz (or 150Hz) over S.PORT? I'm asking because of this commit message, that says S.PORT uses 200K baud to talk to the module using CRSF.

Are those different things? Can you please clarify that to me? I'm dev but no hardware expert. Just trying to make things work on an old radio I have with a custom opentx.

wvarty commented 3 years ago

@juliannojungle those are two different things. The module requests packets from the handset at whatever frequency it needs them (50hz, 150hz for Crossfire, or 250hz for Tracer). The baud rate doesn't really affect the packet update rate, and really only affects the time it takes for the handset to transmit one full packet to the module via the UART. The baud rate for the CRSF protocol is 400k (not sure where you dug up that 200k from, but it looks pretty old), which is plenty fast enough to get the packets to the module with minimal latency overhead.

@kamik2 I can confirm this has been fixed in 1.23. Closing the issue.