- Posts: 22
Serial out for LRS boxes
- Whiffles
- Offline
Please Log in or Create an account to join the conversation.
- Whiffles
- Offline
- Posts: 22
hexfet wrote: I've made a first pass at the CRSF protocol. Test build (5026091) is available . This build only supports the RC channel values. No telemetry or configuration yet. No Crossfire module to test with but output looks good on analyzer.
On the T8SG-Plus connect the top and bottom JR pins together. I confirmed with TBS support that if the CRSF signal is present on both pins their module will accept the CRSF protocol on the bottom pin. The CRSF protocol signal will also appear on the tip connection of the trainer port jack on all transmitters.
To use select the CRSF protocol. Please report results.
I finally managed to get a response by excluding the top pin and redirecting it to the bottom input of the CRSF module, but when I jumped the top pin to the bottom pin with a wire it no longer worked. It seems when the CRSF module receives the same input from both the top and bottom pins it doesn't work.
On the plus side the CRSF protocol does work!
Please Log in or Create an account to join the conversation.
- Whiffles
- Offline
- Posts: 22
Please Log in or Create an account to join the conversation.
- Alx_Slk
- Offline
- Posts: 4
Please Log in or Create an account to join the conversation.
- Fernandez
- Offline
- Posts: 983
Please Log in or Create an account to join the conversation.
- hexfet
- Offline
- Posts: 1868
Thanks for the testing and detective work! Glad you found the issue and a solution. I've emailed TBS support with a link to your post and asked them to take a look. It seems the answer they gave previously is not correct. Are you running the latest TBS firmware?Whiffles wrote: I finally managed to get a response by excluding the top pin and redirecting it to the bottom input of the CRSF module, but when I jumped the top pin to the bottom pin with a wire it no longer worked. It seems when the CRSF module receives the same input from both the top and bottom pins it doesn't work.
On the plus side the CRSF protocol does work!
For configuration I'm thinking some screens under the protocol options, but haven't looked into how difficult that would be. The protocol documentation is clear on how to send the configuration information but I'll need to look at the lua scripts to understand how the screens should be organized. It will be some time before there's something to test.
Please Log in or Create an account to join the conversation.
- Dueppel
- Offline
- Posts: 2
Please Log in or Create an account to join the conversation.
- hexfet
- Offline
- Posts: 1868
For the issue of having to disconnect the top JR module pin from the Crossfire module, TBS responded that it shouldn't be necessary, but "It's possible the high datarate overloads the PPM module." Good news is they volunteered to send me a unit for testing, which will also be useful for developing the configuration screens.
Please Log in or Create an account to join the conversation.
- brycej
- Offline
- Posts: 28
Please Log in or Create an account to join the conversation.
- Dueppel
- Offline
- Posts: 2
Please Log in or Create an account to join the conversation.
- brycej
- Offline
- Posts: 28
Please Log in or Create an account to join the conversation.
- brycej
- Offline
- Posts: 28
docs.google.com/spreadsheets/d/1LPpkwxKV...SvI/edit?usp=sharing
Looks to be a little slower then taranis on opentx or ersky9x.
Haven't looked at the code at all, but my guess is that 0-5ms mixer calculation adding most of the latency (that you already changed on other protocols) ?
Please Log in or Create an account to join the conversation.
- Whiffles
- Offline
- Posts: 22
hexfet wrote: For configuration I'm thinking some screens under the protocol options, but haven't looked into how difficult that would be. The protocol documentation is clear on how to send the configuration information but I'll need to look at the lua scripts to understand how the screens should be organized. It will be some time before there's something to test.
I had a look at the Lua scripts and they seem pretty simple. I think they just request the configuration options from the receiver directly. It responds with each option to build the menu dynamically. When a value is changed it's sent to the receiver in real time. Shouldn't be too hard to code I don't think.
Please Log in or Create an account to join the conversation.
- hexfet
- Offline
- Posts: 1868
Yes, in the t8sg plus the module bay power pin is always active. The CRSF protocol does stop sending when a different protocol is selected.brycej wrote: Worked well for me! Didn't realize the module bay is always on? Or was there a setting when I switch to a different protocol. Otherwise I got to remember to unplug it when I am flying the frsky quads.
After my last post I realized I could also test the SBUS and CRSF protocols. Since their timing is simple I experimented with adjusting it dynamically based on actual mixer runtime. Typical mixer runtime value for 6 simple mixers settles at 350 microseconds. Since you were benchmarking FrskyX I also implemented the dynamic adjust there, but due to other processing in the protocol the minimum time given to the mixer to run is 500 microseconds. Since my small quad uses SFHSS I also implemented it there (350 us). Also added a protocol option to SBUS to adjust the packet period from 14 to 6 milliseconds in steps of 1. So with the latest test build CRSF should have a stick input to serial output latency of about 0.4 to 4.4 milliseconds. Then measured delay would also have the radio and fc delays.brycej wrote: Haven't looked at the code at all, but my guess is that 0-5ms mixer calculation adding most of the latency (that you already changed on other protocols) ?
Test build reduce_latency is updated ( 4acdab9 ). Source here .
- Reduced latency added for SBUS and CRSF
- Reduced latency improved for FrskyX and SFHSS
- Protocol option in SBUS to adjust packet period in milliseconds
Please Log in or Create an account to join the conversation.
- brycej
- Offline
- Posts: 28
Please Log in or Create an account to join the conversation.
- brycej
- Offline
- Posts: 28
docs.google.com/spreadsheets/d/1LPpkwxKV...SvI/edit?usp=sharing
It seemed like it helped a bit. The fastest runs were almost a 1ms faster then opentx and ersky, and seemed to get rid of that bimodal distribution it had before. But overall it the average sample is still about 2-3ms slower then opentx and ersky9x.
Also when I have the crossfire or frskyx protocol selected on the t8sgv2 plus I can't hold the button to shut down the transmitter, when I switch protocols then it works fine.
Please Log in or Create an account to join the conversation.
- brycej
- Offline
- Posts: 28
Tab: deviation test code summary has just the testcode comparsion
tldr; Roughly 0.3-0.5ms faster then the previous test build you had.
Please Log in or Create an account to join the conversation.
- hexfet
- Offline
- Posts: 1868
Not sure why the range of latencies is so large. Worth looking at.
Please Log in or Create an account to join the conversation.
- Whiffles
- Offline
- Posts: 22
Please Log in or Create an account to join the conversation.
- hexfet
- Offline
- Posts: 1868
Planning to work on the configuration settings when the test unit arrives. It has started the trip.
Please Log in or Create an account to join the conversation.
- Home
- Forum
- Development
- Protocol Development
- Serial out for LRS boxes