iNavFlight / inav

INAV: Navigation-enabled flight control software
https://inavflight.github.io
GNU General Public License v3.0
3.17k stars 1.48k forks source link

PPMSUM compatibility with UltimateLRS #1071

Closed PacciK closed 7 years ago

PacciK commented 7 years ago

Would be nice if @digitalentity could widen up the PPM_SUM input parameters to accept the 16 Channel PPMSUM stream, as generated by UltimateLRS.

The space between each frame seems to be strictly 4.00ms irrespective of how many channels are used, and at which position they are at ( even 2000uS or more ).

Having a quick look at the code in your source, I do not know if your code measures the frame space for >4ms to be valid, however, what seems to be the issue, may well be: #define MAX_SUPPORTED_RC_PPM_CHANNEL_COUNT 12, which is found in rx.h

This 16ch PPM stream works fine with any Ardupilot/APM board. ( tested personally) However, it does not work with iNav, Cleanflight.

In my case, my radio is sending out a 12channel PPM signal, however UltimateLRS still sends out 16ch, even if the last channels are unused.

So I would be very happy if the PPMSUM input code can accept this 16ch, even if I will not be using more than 12, and therefore, there is no need to modify the iNav Configurator at this stage.

Here are some Oscilloscope grabs.

Thanks a Million !

newfile0 newfile1 newfile2

PacciK commented 7 years ago

Felt the need to add that, on failsafe, an UltimateLRS receiver will output just 1 pulse ( the 16 channels disappear, and just the start frame remains ). If needed, I am very willing to help with further oscilloscope screenshots, even a video clip to explain.

PS. I plan to test iNAV on a Bix3, with UltimateLRS for control and serial up/down link, SPRacingF3 board (dampened), Neo-6M GPS, microOSD, and an external magnetometer in a nice mag-interference free location on the plane. Plan to capture some datalogs on the onboard Flash.

digitalentity commented 7 years ago

@PacciK can you please test the attached hex file? inav_1.6.0_SPRACINGF3_ppm16.hex.gz

wilco1967 commented 7 years ago

Hi Konstantin,

Where could I find a version for the SPRACINGF3EVO ? I can compile myself, but where is it hidden ?

digitalentity commented 7 years ago

@wilco1967 you can checkout the ppm-16-channel branch

wilco1967 commented 7 years ago

Hi Konstantin,

yep, that seems to work....

Just flew it a few meters behind my home (it's already dark outside) using the ULRS receiver on PPM, but seems to work fine.... Probably Saturday before I can attempt a proper flight furhter out.

I didn't check all 16 channels but 1-8 and also 16 work fine, so 9 to 15 are probably also fine.

Only 'issue' is they calibration is slightly off.... need to go to +512 (max) on output ranges in the taranis to get close to 2000 uS. on the receiver tab in iNav...

With the Frsky receiver, I'm pretty close to +500 (+1500) to get 2000 on iNav (also PPM mode) probably says something about the accuracy of the 433 modules I use... ;-) On the TX side, I use a OrangeLRS receiver 100 mw module configured as TX... The receiver side is a Wolfbox receiver module (100 mw) Telemetry works fine at 19200 on UART1, 57600 on the bluetooth side...

Oh, and for the record.... the 'normal' 8 channel PPM from the Frsky, also still works fine

Now if I plan to keep flying on 433, I need to get the telemetry from the 433 module onto the Taranis screen.... There is some project doing just that using a Teensy... probably my next modification... ;-)

Thanks a lot !!! I guess you will include this in the next release ?

wilco1967 commented 7 years ago

Just for info.

I flew it out today using ULRS for control.... As far as iNav, all worked fine, including failsafe.

However, not so happy with the current range of my ULRS setup. Started to get problems with control when only 200 meters out... Both receiver and Tx are only 100 mw modules, and the receiver only has the stock Wolfbox antenna which probably is to blame, but I'll return to my trusted Frsky...

The Transmitter side is a 100 mW orange RX module (configured as a Tx, with a 'proper' Goya NA775 antenna), the receiver side is a wolfbox 100 mW rx with the stock antenna)

I didn't get the ULRS for control, but only for telemetry... just wanted to see how it worked, and I know that now. ;-) I never fly out further than say 1 km (also range limit for my video link), and Frsky will do that without problems. Thanks anyway for the 16 Channel PPM... I'm sure there are many other people thankful for that !

Didn't encounter any problems with iNav

INAV/SPRACINGF3EVO 1.6.0 Feb 8 2017 / 18:01:12 (07c4b14)

All seems to work perfectly !!! Thanks again !

digitalentity commented 7 years ago

@wilco1967 433MHz is tricky. Good antennas matter a lot - I advise you replace stock antenna ASAP - Chinese often mix then up - it might be 5.8G or 2.4G instead of proper 433MHz. IRC Sander-style antennas work quite good.

Also, cheap receivers lack low-pass filter on the antenna which significantly reduce performance. I don't know if WolfBox has it or not.

For LRS I'm using TBS CrossFire with great success - I'm more likely to lose the video feed rather than control.

wilco1967 commented 7 years ago

yeah, I know..... But the stock antenna 'looked' like a proper antenna, very much like a sander style... definitely not a 5.8 / 2.4 From what I've read, the wolfbox doesn't have the filter... Previously, I had also an orangeRx, which had a much better range (but that one was lost on the fly-away ;-).

The Crossfire is a little above my budget I'm afraid ;-)....

EDIT: My 'wolfbox' Rx stock antenna is pretty much an exact copy of the Sander style, However, it seems like the soldering joint is not good... the connection is intermittent... That probably explains a lot..... Will try to repair.