edgetx icon indicating copy to clipboard operation
edgetx copied to clipboard

GX12 momentary switches SG lock into on position and all other buttons stop working

Open arkarkark opened this issue 8 months ago • 173 comments

Is there an existing issue for this problem?

  • [x] I have searched the existing issues

What part of EdgeTX is the focus of this bug?

Transmitter firmware

Current Behavior

Twice now with two different models (Pumpkin and Diana Jet) my GX12 has got into a state where buttons/switches no longer work and it appears to be in high rates mode. I have these models set up so that when I press momentary shoulder switch SG I get full throws on my ailerons. Usually they only go to 40%. This allows me to do sick quick rolls, but control my plane normally when not being fancy. Last week after doing some super fast rolls using SG the plane remained in high rates mode and the switches stopped working since I put it in RTH and it carried on flying under my control, not RTH. Luckily I still had control, but no switches worked. The same thing happened today with my pumpkin, I've attached the model file since it's simpler than the jet which has a flight controller.

I managed to bring this one down somewhat safely when I worked out what was going wrong and took a video of the radio sending full throws and the switches not working. It says "excellent" when I press SG, but it no longer did it in this weird stuck state. Then, leaving the plane powered up I power cycled my radio and it went back to normal mode and after connecting I only had 40% throws again until I press SG.

https://youtu.be/asbKazfmVcQ

pumpkin.yml.txt

This might be somewhat related to https://github.com/EdgeTX/edgetx/issues/5810 but it's not quite as serious and I've had a new motherboard and I'm running latest firmware since that happened.

I'm running the latest 2.11 RC 4

Expected Behavior

releasing SG should put my plane back into 40% throws mode and the switches and buttons should still work.

Steps To Reproduce

  1. fly around and press SG and do super cool quick rolls.
  2. at some point (not every time) it might get stuck in high rates mode (SG down) and it will no longer play track that says "Excellent"

Version

2.11.0-rc

Transmitter

RadioMaster GX12

Operating System (OS)

No response

OS Version

No response

Anything else?

No response

arkarkark avatar Apr 27 '25 23:04 arkarkark

Ouch! I've not in a position to watch the video atm, but the crux of this is SG stopped responding completely? Can you list what other switches haven't worked in this state also, to see if there is anything common to those. However, I suspect if one stops working, they all stop, ideally (i.e. fixable) due to a firmware/timing bug.

pfeerick avatar Apr 28 '25 00:04 pfeerick

I'm pretty sure they all stopped working. but for sure the momentary SG and the 3 position SB (since I use that for RTH) next time I can confirm that they all stop working. Thanks for the quick reply.

GX12 buttons

arkarkark avatar Apr 28 '25 01:04 arkarkark

I also use SH to blip 100% throttle so next time I fly I'll be playing these buttons like an accordion to try and trigger this bug and collect more data.

arkarkark avatar Apr 28 '25 02:04 arkarkark

not sure if it's worth mentioning, but I ram the same setup on my jumper t-pro (and t-pro v2) and never had this problem. I'm not stoked with how squishy these gx12 buttons are and wonder if it's debouncing logic causing it? just a totally uninformed guess, but you mentioning timing brought it to mind.

arkarkark avatar Apr 28 '25 04:04 arkarkark

You said you replaced the motherboard - might be worth double checking all the cables and connections are properly seated.

philmoz avatar Apr 28 '25 04:04 philmoz

yah, double checked them. the switches work again after power cycling the radio so it's not that. I spent today (6+hours) with the radio on and pushing the shoulder buttons and pretending to fly and couldn't reproduce it, not the whole 6 hours, but many times over that period. so next up is to try with it connected to a receiver so it's getting telemetry data back. maybe that was causing the timing issue.

arkarkark avatar May 03 '25 05:05 arkarkark

This happened again twice today. Luckily I was able to land both times since I was flying my dumb wing and the only behavior was full throws. I took another video if you want to see it I can share it. I also have the sdcard log file too if that might help.

I tested more and indeed no switches on the top or the radio work (SB -> SG) they don't do anything and the indicator on the screen showing their state doesn't change too. and SG the momentary press button that behaves like it is locked down remains in the pressed state on the screen even though it is not being pressed.

The 6 color led buttons just below the power button also do not work. I have some of them call a specail function and they do not do that.

The trim buttons DO work. as do the MDL, jogwheel/enter and RTN, Page> page< (I didn't check tele or sys) The power button also worked to turn the radio off and when I turned it back on everything worked as usual and expected.

It is not just this model, I have another model the same thing has happened on. that one crashed because my return to home switch change didn't get picked up. I've never had this problem with the same models on my jumper t-pro (v1 and v2). I'm close to switching back to that as I'm losing faith in this GX12.

arkarkark avatar May 04 '25 19:05 arkarkark

I managed to reproduce this at home while not flying today. I verified that the pots and sliders (even the ones on the button/switch breakout board) still work. I also switched models and then back it still had the same problem. I also went into sys->hardware and changed some of the buttons from toggle to 2pos and then back that did not fix the problem either. I'll try and work out a quick way to get into this state so I can help verify a fix or collect more data for you. I could even run a special build which would collect data from some sys or model menu item if that'd help.

arkarkark avatar May 07 '25 11:05 arkarkark

This is still happening to me on a regular basis. Not every single flight but at least one time each day that I fly. It has caused quite a few crashes and I'm worried I'll end up losing a plane because of it. Is there anything I can do to help track this down?

I'm sure I'm triggering this bug because I press SG a lot, but that doesn't mean other users won't come across it and also lose control of their models. The big issue is, once this happens the switches stop working completely and so you can not put your model into RTH or some other failsafe, whatever you wanted to happen momentarily with the switch is now happening all the time and there is no way to stop it or go back to normal unless you have the presence of mind and time to turn of your transmitter and turn it back on and hope you reconnect with your model.

arkarkark avatar May 26 '25 22:05 arkarkark

@arkarkark since you did not mention it: did you update to 2.11.1 or are you still using 2.11.0-rc0?

raphaelcoeffic avatar May 27 '25 07:05 raphaelcoeffic

I thought I was, but I was only running 2.11-rc4 I just flashed 2.11.1

arkarkark avatar May 28 '25 01:05 arkarkark

I thought I was, but I was only running 2.11-rc4 I just flashed 2.11.1

Could you please try with the builds from https://github.com/EdgeTX/edgetx/pull/6321 ? Or with the nightly build (same kind of changes already there)?

raphaelcoeffic avatar May 28 '25 05:05 raphaelcoeffic

I made another PR that should help solve the issue here: #6325

raphaelcoeffic avatar May 28 '25 14:05 raphaelcoeffic

I tried the new nightly today (I confirmed it was the one with #6325 in it) and I thought this was fixed, but towards the end of the morning the buttons all locked up again. this time it was the SE switch (3 pos, not momentary) which caused the lock. I never had the buttons lock up by using SG and I hammered on SG all morning long. flipping SE was an accident, but no other buttons would work after it locked up.

arkarkark avatar May 31 '25 20:05 arkarkark

Observed for the first time the behavior described above - ver 2.11.0. I use SH for playing altitude value. The log shows that after pushing SH for the 5th time the value for SH stays high for the rest of the flight (around 10 minutes). All other switches were not working during this time. Stick input was working normal. Question : can it be ruled out that stick input is affected as well ?

Orion-2025-06-02-124512.csv

hw999 avatar Jun 02 '25 14:06 hw999

The sticks are using a different interface to the processore than the switches, so it is etremely unlikely to affect the sticks

gagarinlg avatar Jun 02 '25 14:06 gagarinlg

Nice to hear - thanks.

hw999 avatar Jun 02 '25 14:06 hw999

@hw999 could you try this binary ? (maybe on a backup of your sd). It does include a measure we have tried to deal with this issue (that we still have been unable to replicate so far).

In SYS/Hardware, at the bottom you have Keys debug screen. It should display INT: and then a number. Could you check that it increase by one (and only one) when you toggle a switch ?

firmware.bin.zip

3djc avatar Jun 02 '25 14:06 3djc

@3djc yes - I can try this binary. The GX12 does not have a removable SD-card and I have problems opening the built-in SD-card under Linux mint. The SD-card opens read only all the time. Companion can not find the SD-card. Never encountered this on a couple of TXs with removable SD-cards. Do you have a hint how to solve the problem ? When connecting to a Windows laptop I don't have this problem.

hw999 avatar Jun 02 '25 15:06 hw999

@3djc Checked with the firmware you sent. The momentary switches SA SD SG and SH are sometimes counting more than two - one for pushing and one for releasing. In the region of 1 out of 5 triggers they count 3 or 4. I did not test for a long time but the other switches seem not to be affected.

hw999 avatar Jun 02 '25 17:06 hw999

2 is normal, that's one for each position changes, more means some bouncing does happens, but likely not critically if you get 'only' 3 or 4. I'd rather not have those tho

3djc avatar Jun 02 '25 17:06 3djc

I'm also seeing 3 & 4 count increments with SA SD SG SH My SD is configured as a 2POS and it still sometimes counts 3

Should I go back to the nightly or is this firmware just as good for flying as the nightly?

arkarkark avatar Jun 04 '25 01:06 arkarkark

The SD-card opens read only all the time.

This could indicate file system corruption or that the handset was disconnected without unmounting the file system first. When the file system has the "dirty" bit set, Linux will only mount read-only unless you fix or force it otherwise (not recommended).

Run sudo dosfsck -a /dev/##devicename## to check and fix the file system, which will also clear the dirty bit if everything is ok. You can lsblk to figure out the device name, or check the last few lines of dmesg if you've just plugged the handset in.

pfeerick avatar Jun 04 '25 01:06 pfeerick

I'm also seeing 3 & 4 count increments with SA SD SG SH My SD is configured as a 2POS and it still sometimes counts 3

Should I go back to the nightly or is this firmware just as good for flying as the nightly?

You can fly with it

3djc avatar Jun 04 '25 06:06 3djc

@pfeerick Direct hit ! Problem solved. Thanks a lot.

hw999 avatar Jun 04 '25 21:06 hw999

@pfeerick Direct hit ! Problem solved. Thanks a lot.

@hw999 Just confirming, this is a fix for your sdcard, and the switches locking is still a problem?

arkarkark avatar Jun 04 '25 23:06 arkarkark

@arkarkark yes, post was about sd-card. Regarding the switch lock - I have to wait and see. It occured only once in 10-15 hours of use running 2.11.0. Now running 2.11.1. Around two hous of use running fine.

hw999 avatar Jun 05 '25 07:06 hw999

Working on an upcoming radio, we identified a rare occurrence of an issue that may affect the port expander used also in GX12. @hw999 and @arkarkark could you test this ?

firmware.bin.zip

3djc avatar Jun 07 '25 10:06 3djc

excellent! will do later today. Thanks.

arkarkark avatar Jun 07 '25 10:06 arkarkark

@3djc I test if you tell what I should be looking for. The same same a in the previous test-firmware ? Toggle count ? Would help if you would explain precisely what you are looking for and why.

hw999 avatar Jun 07 '25 16:06 hw999