Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IMU not working properly on X12s #2786

Closed
1 task done
Kevltan opened this issue Nov 23, 2022 · 16 comments · Fixed by #3171
Closed
1 task done

IMU not working properly on X12s #2786

Kevltan opened this issue Nov 23, 2022 · 16 comments · Fixed by #3171
Labels
bug 🪲 Something isn't working
Milestone

Comments

@Kevltan
Copy link

Kevltan commented Nov 23, 2022

Is there an existing issue for this problem?

  • I have searched the existing issues

What part of EdgeTX is the focus of this bug?

Transmitter firmware

Current Behavior

The IMU problem is back again with touch panel modification!
I am re-opening this issue because I believe there is still something wrong here. What I have noticed now is IMU won't work all of the time on power up, but if I hold the T1, T4 trims in and and power on as though I was going to do a firmware update in bootloader and then exit instead, it works every time! Anybody any ideas? I really am giving up here because there seems to be no logic in it. I think I've fixed and then I haven't! Still thinking there must be something in the startup/powerup routine that is different to the boot loader and exit routine - works everytime from the bootloader🤔.

Expected Behavior

IMU not functioning every time radio is switched

Steps To Reproduce

  1. Sometimes when powering up no IMU active.
  2. No response until a power recycle - maybe....sometimes!
  3. Power up with bootloader and exit IMU functions everytime.

Version

Nightly (Please give date/commit below)

Transmitter

FrSky X12

Anything else?

2.8.0 selfbuild RC4

@Kevltan Kevltan added bug 🪲 Something isn't working triage Bug report awaiting review / sorting labels Nov 23, 2022
@Kevltan Kevltan changed the title IMU not working properly on X12s still! IMU not working properly on X12s Nov 23, 2022
@pfeerick
Copy link
Member

Raphael has commented in the dev chat that there is a clash between touch screen controller task and imu task, so this may be related, and as such is on the radar to be fixed, but that will most likely be a 2.8.1 fix.

@Kevltan
Copy link
Author

Kevltan commented Nov 24, 2022 via email

@Kevltan
Copy link
Author

Kevltan commented Nov 28, 2022

I am having no problems with IMU since changing to 2.8.0 "Flying Dutchman" now working everytime. Has something been changed? I have noticed that there is no call for IMU_LSM6DS33 in System/information/version/OPTS:, which I called for in
cmake -Wno-dev -DPCB=X12S -DDEFAULT_MODE=1 -DIMU_LSM6DS33=YES -DCMAKE_BUILD_TYPE=Release ../. this was shown listed in the my OPTS: Had I created the bug myself when self building?
The absense of IMU call in the list seems to have no effect of IMU's operation which now seems to work as it should! 🤞🤞
WILL OBVIOUSLY CONTINUE TO MONITOR....... but looking really good so far👍

@pfeerick
Copy link
Member

pfeerick commented Nov 28, 2022

That is quite possible... Unless you're using the LSM6DS33 and not on the X12S, IMU is the flag for IMU support on the X12S (and is on by default)... ;)

image

In this particular snippet it should still correctly use the X12S IMU config, but perhaps it was going wrong somewhere else. Or you've just been lucky so far :)

@Kevltan
Copy link
Author

Kevltan commented Nov 30, 2022

There are still problems with the IMU freezing when going through various model/system pages, but it can be resolved with a power re-cycle now.

@1Sven
Copy link

1Sven commented Dec 1, 2022

A big problem, because IMU and display interfere. Raphael already has a great idea and I hope he solved this bug in 2.8.1 as well.

@Kevltan
Copy link
Author

Kevltan commented Dec 14, 2022

I temporarily disconnected P8 and I2c wiring from the touch panel to eliminate all hardware additions. Tried IMU functionality and still failing with the same shortcomings as decribed earlier, this isolates the touch panel itself from the equation. So believe this is definately a firmware and/or SD card software conflict somewhere and NOT hardware related.
I have reloaded the themes software on the SD card because I was losing the IMU when editing the colours. This seems to have "improved" the issue and so far have had no failures going in and out of menus I mentioned previous, maybe the conflict resides in the graphics driver or themes software somewhere!! Will keep on testing 🤞🤞🤞

@Kevltan
Copy link
Author

Kevltan commented Dec 14, 2022

Some interesting information I found which might help the developers pin point the problem. I have 2 SD cards one 8GB and one 16GB, both formated and named the same with EXACTLY the same software copied on them. The IMU does not work with the 8GB but does with the 16GB when TX booted, but they both load with everything else working normal. This is 100% repeatable.....Any ideas??

@Kevltan
Copy link
Author

Kevltan commented Dec 25, 2022

Still experiencing same problems, IMU sometimes works and sometimes doesnt when powering up or during editing it freezes. Always works when initiating boot loader and immediatley exiting using the exit prompt but after this can still freeze whilst editing pages. This is seems to be NOT related to a hardware probem as is still repeatable with the touch panel disconnected.

Is the IMU problem "historical" and has not been picked up before because of its limited use??

@pfeerick
Copy link
Member

Only someone with access to the hardware is likely to be able to fix it. @raphaelcoeffic is one such person, and as was commented on earlier, has some idea as to what could be the issue ;) As far as whether there is a historical problem, that is anyone's guess atm, as since you point it has had limited use. However, I'm inclined to think it is still related to the TP support, regardless of if one is connected or not, as that is fairly new and an unusual combination.

@Kevltan
Copy link
Author

Kevltan commented Dec 29, 2022 via email

@Kevltan
Copy link
Author

Kevltan commented Jan 7, 2023


All problems with IMU not working on start up caused by having a splash.png file too large in the System/Images file on the SD card. The size was 220kb this is too large and seems to upset the IMU on start up. I used an online .png file compressor to reduce it to 89kb without changing pixel count of 480 X 272 https://tiny-img.com/png-compressor/. I have tried this on cards from 256Mb - 32Gb standard and SDHC format. All formatted to Fat32 default allocation. IMU has not failed since! So if your running your own splash screen at start up it can't be much over 100kb in size. The ones I created online in https://www.air-rc.com/ or https://www.skyraccoon.com/ were too big and needed reducing.
Hope this helps anybody experiencing this problem.


@pfeerick pfeerick added this to the 2.8.1 milestone Jan 25, 2023
@Kevltan Kevltan closed this as completed Feb 2, 2023
@Kevltan
Copy link
Author

Kevltan commented Feb 2, 2023

THIS NOW WORKS FINE AFTER THE ABOVE ISSUE ADDRESSED

@raphaelcoeffic
Copy link
Member

@Kevltan the issue with picture size / time to load is now obvious. The sensor initialisation is done in the UI task, while it is queried in the mixer task. This can never work and basically amounts to a race condition as which one of the two happens first:

  • error counter in mixer task is incremented up to 100, at which point the sensor will not be asked again,
  • and when the sensor is actually initialised (hopefully before the error counter reaches 100)...

@Kevltan
Copy link
Author

Kevltan commented Feb 10, 2023 via email

@raphaelcoeffic
Copy link
Member

Ok so would the answer be to limit the image file size of the Splash.png

No, you don't take aspirin when you have a bullet in your head: you go to surgery. Here it means, we fix it properly (see 828b5c0).

@pfeerick pfeerick removed the triage Bug report awaiting review / sorting label Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants