-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
arm and disarm causes MATEKH743 to lose connection with radio in INAV 5.1.0 #8409
Comments
Tested Standard and DSHOT150 protocols. Using Spedix IS45 2-6S LiPo DShot BLHeli_S 45A ESC. INAV does not lose Radio comms if I test the motor using Outputs tab. Motor runs as expected. Also tested without battery connected and the issue still occurs. Red failsafe indicator does not light up when error happens. It does light up if I do not trigger the error and switch off my radio. Even though I have no control, data still coming through from plane to INAV LUA screen on radio. |
what crossfire FW version do you use? There are some older versions with odd behavior like this. |
Nano Div. RX - v6.19 |
hmmm 6.19 should be stable. did you do a factory reset of your crossfire receiver and module after the last update? If you update from 6.14 or earlier you have to do a factory reset. Maybe try that and then see if the issue still appears. if yes, I suggest to reset the FC to defautls and just set up the basics and see if this solves the issue. Save a DIFF ALL before that. |
I did do a factory reset of the TX but not sure about the RX. I will test this later today and post my results. |
Rx you should reset first over the crossfire settings LUA. because you will lose binding and doing it last will be more difficult |
Thanks, will do. |
Ok, I think I have narrowed down the issue. The RX and TX reset did not fix the issue. As suggested I then reset the defaults on the board and started from scratch. I set up only one mode for arming on Channel 5. I have not completed the setup, adding the rest of the modes etc. I will wait to hear back before making more changes. Thanks. |
this is really strange. can you please post a DIFF of your current config right at this point where enabling or disabling this setting causes the lockup? |
Might have something to do with it, gets called when autotrim saves eeprom on disarm ? Line 330 in 69b18f2
|
Possible. But why does this block his RC inputs without commanding a failsafe? @vlamgat007 do you use a switch to arm and disarm or do you disarm with a stick command? Anyway. I was hoping that @DzikuVx would remove the auto-save for the continous servo trim as well, when he removed it for the bootup gyro calibration. After a one time trim save with stick I see no point in saving it after every flight with minimal changes. But that's stuff for a different discussion. |
It looks like it suspends the Rx signal for a fixed 1.5s period ( |
Having said that surely if it's writing to eeprom it shouldn't be doing anything else should it, like try to process Rx signals ? |
There is no stick command to disarm anymore. I think it was even gone in 3.0. |
Diff all at point of failure: https://pastebin.com/8YEMD5Bg Please note the Failsafe triggered but I have had multiple times when there was no failsafe but I had no control. |
I use a switch on channel 5 to arm and disarm. |
diff all with no failsafe: https://pastebin.com/EDA0WcY8 |
Failsafe is suspended during eeprom save so it doesn't trigger when the Rx is suspended. The fact that Failsafe behaves erratically during this problem might indicate there is an issue with Rx suspend during eeprom save. Be useful to know why the Rx is suspended during eeprom save, not immediately obvious. Also wondering if this has anything to do with #7128. The only time I had a Config wipe was on a plane that was connected to Configurator and powered from the battery when it happened. The Rx only works on that plane when on battery power not USB. |
I have tried with battery connected and without (usb only) and had the same result. |
Seems the Rx suspend during eeprom write is to do with 3a13edf. |
@vlamgat007 Can you try the attached firmware. It's the current master with Rx suspend time increased to 3 seconds. You'll need to use the latest 6.0 Configurator which can be found at http://seyrsnys.myzen.co.uk/inav-configurator-next/. |
@vlamgat007 If you want to stick with 5.1 you might also want to try my 5.1 build without auto ContinuousServoAutotrim saving. |
Thank you @breadoven and @0crap! I like having ContinuousServoAutotrim so I will try v6.0.0 first. |
@vlamgat007 Try whatever you like, but please be assured that in my 5.1 build ContinuousServoAutotrim is fully functional. |
@0crap, thanks for the clarification! |
Success! I loaded 6.0 and flashed with the 6.0.0 firmware provided by @breadoven. I updated using the last Diff All that I posted and then tested the arm and disarm. There is a bit of a longer delay before you get control back after flipping the disarm switch but that seems like a minor issue. I completed the rest of the setup and everything seems to be working as expected. BIG THANKS to everyone for your support on this!! Let me know if you have any further special instructions. I take it that I need to keep my Matek F405-WSE Controller on 5.1.0? |
@vlamgat007 Just remember the 6.0 firmware is dev standard so could have issues, not that I've had any problems. Other FC boards are fine on 5.1.0 if they work OK. So it appears the default Rx suspend time setting during eeprom write is probably causing problems but it's not clear why it only seems to happen with Auto Trim on disarm but not with other eeprom writes such as sensor detection and Accelerometer calibration on boot up. I assume nothing odd happened previously with 5.1.0 during accelerometer calibration on boot, completed as normal with the beeper confirmation at the end ? |
@breadoven maybe because when disarming, the actual eeprom write is done first before the actual disarm happens. So all radio inputs are still expected to be valid during that time. All other eeprom saves happen only in already disarmed state. |
I just came back from flying the plane after the changes. Bad news is that it froze up when i disarmed after I landed. Good news is that this happened after it was safely on the ground. |
It waits until the Arming flag is disarmed before saving. Maybe the problem is Stats also get saved at the same time the Arming flag changes state. 2 eeprom writes in succession. Maybe this needs changing so you only write once on disarm. |
Just to clear things and amplify my understanding : |
@0crap Looking back through this stuff I noticed your post which indicated your H743 FC wasn't affected by the eeprom write problem. However, checking the code it seems there is a 10 second minimum arming time before STATS is saved on disarm. Do you think you exceeded this 10s limit when you tested it ? One possibility here to help debugging is a custom firmware with debugging added to the Rx/Failsafe code to try and work out what the signal is doing when it locks up. However, given this happens when disarmed there won't be any log with the debug info so the debugging output would need to be taken from the Configurator sensors tab or recorded from the OSD (probably not DJI unless the WTFOS hack is used ?). |
The attached firmware includes debugging on the Rx and Failsafe side as follows: 0 - are flight channels valid (10 = invalid, 11 = valid)
|
Thank you @breadoven I will load and test this evening. |
Probably not, 10 sec is a long time if you have to wait for it. :-) All this was tested NOT connected to the INAV Configurator. |
@MrD-RC and @breadoven I tested the firmware quoted above and I consistently trigger failsafe. Battery and usb irrespective. Exact same behavior as originally reported. I will now reload the debug version from @breadoven |
@breadoven when I load the debug firmware version with 6.0.0 fp2 I loose connection to the sensors. See the screenshot. |
@breadoven and @MrD-RC Seems for now I will have to revert to the 5.1 firmware from @0crap from Sep 23 comment: If you want to stick with 5.1 you might also want to try my 5.1 build without auto ContinuousServoAutotrim saving. |
@vlamgat007 |
Nobody have any luck using the "debugging" firmware listed above ? |
I loaded it with 6.0 and lost connection with all my sensors. I then reverted and did not try again. I have been told to use the latest "nightly version" of configurator which should fix the issue. I have not got around to it. I will see if I can do it today. |
@breadoven here is an update: I removed the crossfire TX, RX, and VTX and switched my system to ELRS. I am now running a RMRC 1.3ghz vtx. Just mentioning these changed parameters. I could not trigger a failsafe. Attached are the debug sensor logs. |
Thanks for that @vlamgat007 although not so useful since there was no failsafe so everything behaved as expected. And this would appear to be because you've switched RC gear albeit to ELRS which also uses CRSF ... strange it now seems to be behaving. I assume there was a disarm or eeprom save where debug 6 changed value @ around 135 s ? Also what settings did you change switching to ELRS ? |
From my side I've tried on Clean setup (after chip clean reflash). |
Just tested MATEKH743 INAV 5.1 and 6.0 master. No issues with TBS CRSF 6.19. |
I have a similar issue, but with a different board: OMNIBUSF4V3 Workaround: disable continuous servo trim OR change ESC protocol to anything but DSHOT. As there were no 6.0 firmwares posted in this thread for my board, I could not see if this will be fixed. Is there a way to get nightly firmwares for any board? |
@mrbigglesw0rth this is normal during safe procedure. has nothing to do with the bug here. |
Just an update after installing INAV 6 Horizon Hawk. Same setup as original post but now running ELRS. The system consistently looses RC connection on disarm. If I switch off "Continuously trim servos on Fixed Wing" the connection is not lost and the problem disappears. |
Would be useful if you could try #8907. (should be possible to use the firmware shown in the Artifacts section of https://github.com/iNavFlight/inav/actions/runs/4500418426 if you can't compile yourself). |
@breadoven thanks. I will test tonight (CST). Can you confirm, I downloaded inav-6.1.0-ci-20230323-76d2769.zip but there was also a zip file in a post today by @DzikuVx inav_6.0.0_MATEKH743.zip Which one should I use? Thanks! |
Either should work but @DzikuVx hex would be best given it should definitely be the right one. |
t
Thank you @breadoven and @DzikuVx |
@breadoven and @DzikuVx I tested both the following files
The 6.0.0 file did not work, I was able to initiate failsafe consistently. Not every time but probably >50% of the time. |
@vlamgat007 can you try the hex provided here please? Originally posted by @DzikuVx in #8905 (comment) |
I am getting this issue on 7.0.0. It doesn't lose RX link every time you arm/disarm with continuous trim enabled, it lets me arm/disarm 4 or 5 times before it loses RX link. With continuous trim off, it never loses link. |
Current Behavior
I am in the process of upgrading a Matek H743-WING V2 Flight Controller + XF Nano Diversity setup from INAV 3.0 to INAV 5.1 and am running into an issue. When I arm and disarm the system, I lose all radio control to the board (in the Receiver tab the bars stop moving). I need to reboot the board to gain control. It does not seem like any of the other switches cause the same behavior. Firmware for the XF components (RX + VTX) have also been updated.
(FYI....I have successfully completed a similar upgrade for a different plane with a similar setup using Matek F405-WSE Controller + XF Nano and did not experience the same problem)
Steps to Reproduce
Additional context: dump all
https://pastebin.com/uVBzcK75
version
INAV/MATEKH743 5.1.0 Aug 19 2022 / 12:34:02 (76f22b2)
GCC-10.2.1 20201103 (release)
The text was updated successfully, but these errors were encountered: