qba667 / FlyPlusI6X

Modyfication of FlySky I6X firmware
GNU General Public License v3.0
53 stars 8 forks source link

IBUS data freezes for several frames #3

Closed Cleric-K closed 5 years ago

Cleric-K commented 6 years ago

Today I installed the new firmware on my unit and tested it in sims (with vJoySerialFeeder, reading serial data directly from an IBUS receiver). Immediately I felt that there's something different. It was not very pronounced but it was felt. It felt like there's some kind of delay and some jerkiness.

Then I restored the original firmware and everything was back to normal.

I proceeded with some more detailed tests - I tried with two different receiver - IA6B and FS82 - the results were the same so problem in the rx was ruled out.

Then I took hex dumps of the IBUS protocol with both firmwares and after I visualized the data it became quite clear - with the new firmware the data seems to freeze for several frames - the frames still arrive at regular intervals (about 8ms) but several consecutive frames have the same data.

I tried to make similar movements in both cases - first some smooth movement of both sticks and then fast oscillations of roll stick.

This is with orginal firmware: image

and with the patched one: image

Here are the hex dumps, ODS files and also the python script I used: ibus dumps.zip

I have no idea how the firmware works so it's hard to guess what the problem could be. On first look it seems that the TX mcu is experiencing delays and it is sending updates at lower rate. But then why the IBUS frames continue to arrive very quickly? Or the IBUS frames are generated by the RX independent of when radio frames arrive?

Best~

qba667 commented 6 years ago

@Cleric-K, thanks for dumps - that is strange - because mixed seems to be separated task. I will let you know as fast as I find it out.

qba667 commented 6 years ago

@Cleric-K I have looked more carefully at the graphs you provided. It looks like some glitch on mixer task. Handling of radio communication is done with use of separated task - so current mixer values are always send. It looks that they are not updated on time. However the glitch is not the same for all channels

Cleric-K commented 6 years ago

I see. Sorry I can not help more with this. I guess one way to debug it is by disabling the new features one by one and testing to see at which point the behavior will match the original fw.

btw how do you flash any .bin file? I used the gui updater you provided but what if you want to flash custom compiled version?

vvac commented 5 years ago

I believe you need to place it in the same directory as updater and name it correctly. Then the updater flashes external.bin by default. qba667 wrote about this in his rcgroups thread about FlyPlus on i6x.

Cleric-K commented 5 years ago

@vvac Thank you!

Cleric-K commented 5 years ago

Solved by #7