inav icon indicating copy to clipboard operation
inav copied to clipboard

v2.0.0 RC2 Intermittent SBUS connection on Matek F405-STD and RadioLink R9DS

Open Andreas-Hellberg opened this issue 8 years ago • 27 comments

Board and Version

Matek F405-STD BetaFlight STM32F405 Flight Controller https://www.banggood.com/Matek-F405-OSD-BetaFlight-STM32F405-Flight-Controller-Built-in-OSD-Inverter-for-RC-Multirotor-FPV-Racing-Drone-p-1141282.html?rmmds=search v2.0.0 RC2 INAV/MATEKF405 2.0.0 Jun 29 2018 / 12:30:25 (a8415e89c)

Behavior

When I tested upgrading to INAV 2.0 RC2 the SBUS connection became intermittent. The board will read the stick positions for 0.5-1s then there will be a period of no changes for 1-2s then it reads the current RC input for 0.5s-1s and repeat. It's the same result when connected via USB and disconnected.

The same hardware works just fine on all previous versions of INAV I have tested (1.9.3, 1.9.0, etc). I flashed the board with the "full chip erase" option set to true. I tested going back an forth between 1.9 and 2.0 multiple times. On 1.9 it works just fine, but not on 2.0.

Blackbox logs/Config (.ZIP) where problem occurs

https://pastebin.com/Sypn6ReH

Andreas-Hellberg avatar Jul 11 '18 09:07 Andreas-Hellberg

Perhaps the receiver isn't respecting SBUS timings. Can you set debug to SBUSand check what happening on the configurator Sensors tab in the debug data?

giacomo892 avatar Jul 11 '18 09:07 giacomo892

debug_mode set to SBUS: sbus_debug

How it looks in the receiver tab: sbus_intermittent

Andreas-Hellberg avatar Jul 11 '18 10:07 Andreas-Hellberg

Seems like the DESYNC_COUNTER increases... then it is an issue the the receiver not respecting SBUS specifications.

giacomo892 avatar Jul 11 '18 11:07 giacomo892

Might be, but the receiver works fine in the previous releases with the old SBUS driver.

Andreas-Hellberg avatar Jul 11 '18 11:07 Andreas-Hellberg

Older INAV versions were much more relaxed about SBUS input. In 2.0 we have introduced a more strict approach when decoding SBUS packet to be sure that all the data is decoded correctly and no channels have invalid data.

giacomo892 avatar Jul 11 '18 12:07 giacomo892

To me this is a regression rather than an improvement. But hey I'm a bit biased as this stops me from upgrading.. :) I know I could create my own release and just revert the SBUS commits. Might do that in the future if this issue is closed without an resolution. But it could be that the new SBUS driver excludes more than just RadioLink receivers and that would be less than ideal if so.

Andreas-Hellberg avatar Jul 11 '18 13:07 Andreas-Hellberg

None of the devs has a RadioLink system, so troubleshooting this might be problematic.

digitalentity avatar Jul 11 '18 19:07 digitalentity

@giacomo892 @fiam I suggest to add this to known issues section and look into it after 2.0 release.

digitalentity avatar Jul 11 '18 19:07 digitalentity

Added to wiki @digitalentity

giacomo892 avatar Jul 11 '18 19:07 giacomo892

I tested reverting PR 3110 (https://github.com/iNavFlight/inav/pull/3110/commits) and built + flashed it. That worked so that will have to be my workaround for the time being.

sbus_fix

Andreas-Hellberg avatar Jul 11 '18 22:07 Andreas-Hellberg

@Andreas-Hellberg bare in mind you may encounter mid air disarms and any other nasty things.

giacomo892 avatar Jul 12 '18 07:07 giacomo892

@giacomo892 I don't see why. As the SBUS code is the same in earlier versions of Inav. But even if you are right I think my frequent crashing tells me that potential software bugs is the least of my problems. :)

I'll probably have to replace my old RadioLink radio with a FrSky sooner rather than later. But my RadioLink gear have worked fine with, Cleanflight, Betaflight, all previos version of Inav and propitiatory software/hardware from DJI and Tarot. So I still think there is something wrong with the new SBUS driver.

Andreas-Hellberg avatar Jul 12 '18 10:07 Andreas-Hellberg

@Andreas-Hellberg give a shot to RC4 and ply with the sync delay until you see no sync issues on debug data.

giacomo892 avatar Jul 15 '18 06:07 giacomo892

@giacomo892 thanks for the reply, I tried changing the SBUS delay from 500,1500,2500 etc up to 10000. Did not see a significant improvement though. The min/max range for the new settings is reversed so I had to fix that before I could test it out.

image

Andreas-Hellberg avatar Jul 15 '18 18:07 Andreas-Hellberg

@Andreas-Hellberg could you PR the fix?

giacomo892 avatar Jul 15 '18 19:07 giacomo892

@giacomo892 I tired but I get 403 Access denied when I try and push a branch.

Andreas-Hellberg avatar Jul 15 '18 19:07 Andreas-Hellberg

You need to Fork, commit to your branch and then PR to inav :)

giacomo892 avatar Jul 15 '18 20:07 giacomo892

@Andreas-Hellberg do you have an oscilloscope to see the frequency of the SBUS signal output by that RX?

fiam avatar Jul 15 '18 21:07 fiam

@giacomo892 thanks for the help. The tiny PR is now up at https://github.com/iNavFlight/inav/pull/3606 :) @fiam No I don't have access to a oscilloscope. Any way to log the output via a FC?

Andreas-Hellberg avatar Jul 15 '18 21:07 Andreas-Hellberg

Hello. I have this issue with 1.9.1 and Omnibus F4 Pro V2 + R9DS. Freezes when board connected via USB and battery plugged.

gppsoft avatar Jul 16 '18 06:07 gppsoft