DeviationTX / deviation

Custom firmware for RC Transmitters
http://www.deviationtx.com
GNU General Public License v3.0
247 stars 153 forks source link

Implement CRSFshot synchronization between tx and radio #1019

Closed hexfet closed 2 years ago

hexfet commented 2 years ago

Use CRSFshot "offset" telemetry to synchronize packet sends with the transmitter module. This reduces latency by delivering data to the transmitter in sync with when the transmitter will use it.

Prior to this change a Crossfire TX LCD shows "CRSF V2" for the RC Input. After this change the display is "CRSFshot".

hexfet commented 2 years ago

@phobos- @harlock00999 please test when you have a chance

harlock00999 commented 2 years ago

@hexfet I'll be glad to help but I'm not sure how, I'm a user, I'm not able to manage code by myself yet. If you give me a build to flash on my radio no problem. If you wanna tell how to do it, I'm here.

hexfet commented 2 years ago

No worries. I"ve uploaded a test build here.

harlock00999 commented 2 years ago

Great, Thanks! I'm going to test it asap! I'll keep you posted.

harlock00999 commented 2 years ago

Sorry to bother you again but before flashing the test build I was checking the menus and I cannot fine the "CRSF V2" anywhere. I pretty sure I cheched every spot. I'm currently using the f04bc27.

I'm going to flash anyway and see if something change. Any tips will be appreciated.

hexfet commented 2 years ago

It's just "CRSF" name in Deviation. It has been version V2. With #1018 and this PR the CRSFshot features are supported, but there's no new protocol to select.

harlock00999 commented 2 years ago

Got it! Thank you.

Today I flashed the build and did some bench test. Tomorrow I will fly.

phobos- commented 2 years ago

@hexfet I tested with your test build - for me sync worked perfectly, but I stopped receiving telemetry sensors - attitude and battery. I then built my own firmware from this branch and it worked perfectly and I still got the telemetry sensors. deviation-t8sg_v2_plus-v5.0.0-c5c85e5.zip deviation-t8sg_v2-v5.0.0-c5c85e5.zip

hexfet commented 2 years ago

@phobos- Thanks! The test build also includes the changes from #1020 , though none of those changes should break telemetry. Would you please build that branch and see if it breaks telemetry also?

harlock00999 commented 2 years ago

@hexfet I've just tested and on my t8sgv2+ with HGLRC TX2.4 module ERLS2.0 everything seems to work just fine. Telemetry monitor page on the radio is full of information, I can even see my fly mode, did know that. Same in my OSD.

What's next? Am I good to go with this build or should I try the @phobos- 's last too?

btw, is there a legend or something for the telemtry monitor of the readio? Some values are obvious other not (for me of course^^)

phobos- commented 2 years ago

@harlock00999 if it's working for you then no need to flash my build. Missing telemetry is most likely caused by some configuration error at my end.

harlock00999 commented 2 years ago

Perfect! Thanks.

The one thing I noticed though is the delay if I change fly mode: from the activation of the switch to the refresh of the telemery monitor on the radio about 5sec.

hexfet commented 2 years ago

btw, is there a legend or something for the telemtry monitor of the readio? Some values are obvious other not (for me of course^^)

@harlock00999 Section 10.52 of the user manual has a table showing what telemetry values are in each box. What the values mean should be in the module documentation :)

Thanks for testing!

harlock00999 commented 2 years ago

No problem, count on me for future testing!!

Thank you for you tips and your patience, user manual should always be the first thing to check :)