DeviationTX / deviation

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

Added crsf-shot #1018

Closed phobos- closed 2 years ago

phobos- commented 2 years ago

Implementation is based on opentx, tested with ExpressLRS hardware. Before - packet rate is stuck at 250 packets per second. After - packet rate depends on the settings and varies from 25 to 500 per second.

Tested with T8SG V2 plus, builds for T8SG V2 and T8SG V2 plus attached below. deviation-t8sg_v2_plus-v5.0.0-f04bc27.zip deviation-t8sg_v2-v5.0.0-f04bc27.zip

dat-alex commented 2 years ago

Thanks howels for the link ;) @phobos I tried this with my HM elrs 2.4 trying to fly my modified mobula 6HD with new elrs 2.4 aio FC with no success!! The fw on TX is elrs1.1 and I get blank line in CRSF menu on my T8SG plus. I have tried everything ,any help ?

Thank you Alex

howels commented 2 years ago

Thanks howels for the link ;) @phobos I tried this with my HM elrs 2.4 trying to fly my modified mobula 6HD with new elrs 2.4 aio FC with no success!! The fw on TX is elrs1.1 and I get blank line in CRSF menu on my T8SG plus. I have tried everything ,any help ?

Thank you Alex

Have you tried the 2.0 TX firmware? This changes how the CRSF menu works. 2.0 RC3 is the latest current eLRS version.

dat-alex commented 2 years ago

Thanks howels for the link ;) @phobos I tried this with my HM elrs 2.4 trying to fly my modified mobula 6HD with new elrs 2.4 aio FC with no success!! The fw on TX is elrs1.1 and I get blank line in CRSF menu on my T8SG plus. I have tried everything ,any help ? Thank you Alex

Have you tried the 2.0 TX firmware? This changes how the CRSF menu works. 2.0 RC3 is the latest current eLRS version.

I suppose I have to try2.0 RC3 with original deviation nightly builds or phobos deviation-t8sg_v2_plus-v5.0.0-f04bc27.zip above ?

harlock00999 commented 2 years ago

Hi guys,

I just upgraded my T8SG V2 Plus with this FW ver and my HGLRC TX + HM EP2400rx with ELRS 2.0 and everything is working on the bench, menu is on place, options are selectable and drone is arming! ^__^

I'm very happy! Hope to do some flying tests asap, in the meantime thank you all and happy flying !!!

harlock00999 commented 2 years ago

Almost forgot : thanks to @StonedDawg for the link!!!

dat-alex commented 2 years ago

Hi! after I tried every single combination on my Jumper T8SG V3 plus the combination that did the trick was new ELRC 2.0 RC3 on Tx and original deviation fw (nightly build) deviation-t8sg_v2_plus-v5.0.0-c84450e on Jumper. This involved in installing new 2,0 fw on my Happymodel Aio 24ELRS FC ,too but everything is working smooth now. Now I have ELRS on my HM 65HD whoop!

Thank you all for your help.

phobos- commented 2 years ago

@goebish @vladislavy @TheRealMoeder @hexfet this PR has been tested by me (and others) for over two months now, no issues found and the code is pretty simple. It will benefit Crossfire as well as ExpressLRS users. Any chance you could take a look and review this PR so that we can hopefully merge it? 😇

harlock00999 commented 2 years ago

I'm not sure if this can help but I noticed a strange behavior trying the model match function. Did anyone test this particular option on T8SG v2 Plus?!

phobos- commented 2 years ago

@harlock00999 unfortunately model match is not something that deviationTX supports, nor is it a part of this pull request. From my experience if you enable model match feature in ExpressLRS you'll get an ID of 0. If you disable it it will go back to 255 which is OFF.

harlock00999 commented 2 years ago

@phobos- Didn't mean to go off topic, sorry. Thank you for your answer.

hexfet commented 2 years ago

I'm curious if there's a reason the telemetry "offset" value is not being used to align the packet sends with the TX module? In opentx this happens in ModuleSyncStatus::getAdjustedRefreshRate().

phobos- commented 2 years ago

@hexfet DeviationTX has it's own mechanism for sync - mixer_runtime. If I combine the two, or use offset from the module instead of DeviationTX mixer_runtime it doesn't work that well - offsets are optimized for opentx processing times, deviation is much faster. Example in ELRS codebase: https://github.com/ExpressLRS/ExpressLRS/blob/cc1273f28598164a50f4173a7353e878e2ca3b2f/src/lib/CRSF/CRSF.cpp#L343

hexfet commented 2 years ago

@phobos- The mixer_runtime adjustment ensures the most recent possible stick data is used to create the next control packet (see #532). For protocols using internal radios where Deviation is synchronized with the receiver that's all that's needed.

When an external module is used it's the external module that's synced with the receiver, and for lowest latency the serial data sent from Deviation should arrive at the external module at the last possible moment before the module needs it for sending the next over-the-air packet to the receiver. I believe that synchronization is the purpose of driving offset to zero. Wish I had time to dig into ELRS to see how it's implemented there.

At the highest packet rate getting the offset to zero would shave an average of 1ms off the stick to receiver latency, so maybe not even noticeable. Anyway it's not a reason to delay merging this PR, which is definitely a step forward.

howels commented 2 years ago

Please do a merge when possible. Lots of us are flying this and it's great to see action in the deviationTX codebase.

howels commented 2 years ago

@hexfet can you trigger a new build on Travis-ci? The last one was 7 months ago.

hexfet commented 2 years ago

Travis isn't free anymore. I've been fiddling with github actions but don't have a full solution yet.