iNav Quadcopter became stuck in quasi-armed state - Reproducible #6286
Replies: 18 comments
-
Issue-Label Bot is automatically applying the label Links: app homepage, dashboard and code for this bot. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
I've reproduced at head. Once again, armed with the arm switch disengaged. Image. Please take another look. |
Beta Was this translation helpful? Give feedback.
-
It is a feature that you can arm (even if arming is disabled due to e.g. "nav unsafe") by toggling the arm switch rapidly.
|
Beta Was this translation helpful? Give feedback.
-
Two main questions here IMO are:
|
Beta Was this translation helpful? Give feedback.
-
Possible leads:
If an RX driver (SRXL in this case) ends up in a state when the To test this hypothesis you can configure the I'm not at all familiar with SRXL2 code, but it's interrupt-driven and therefore prone to race conditions. |
Beta Was this translation helpful? Give feedback.
-
Answers to pending questions:
Since I'm able to reproduce with firmware built at c108199 by myzen.co.uk, SRXL2 is the only thing I'm doing out of the ordinary. I could see this being the likely cause. My plan of action is as follows:
|
Beta Was this translation helpful? Give feedback.
-
Thanks, that's vanilla master, albeit GCC 10.20, Alpha2 or RC1 will be 9.2 (as your cli
Also tested SBUS on F4, again, no problem, so SXRL2 looks increasingly like the prime suspect. |
Beta Was this translation helpful? Give feedback.
-
Agreed, we're narrowing down on this. Tests with |
Beta Was this translation helpful? Give feedback.
-
Good news, some parts arrived early! I configured my F722 with the same setup and the newest release from myzen.co.uk I have an S.BUS receiver in my possession, but unfortunately the transmitter for it is still in the mail (estimated delivery Tuesday US/Pacific). So here's where we stand:
I can provide more information on Tuesday when the transmitter arrives. Until then, please let me know if there's anything else needed. Thanks! |
Beta Was this translation helpful? Give feedback.
-
I tested this with 2.6.0 Alfa2 on a Revo. Using an iX20 with a SPM4651T @FrankPetrilli What radio are you using (I believe I saw DX6i in another thread? Is it DSM2 or DSMX?), and what firmware version are you using on the receiver? I believe there was a receiver bug fix at some point this year that addressed an issue with 22ms only radios. Might want to update your receiver it if it doesn't have the latest version already. |
Beta Was this translation helpful? Give feedback.
-
@MiguelFAlvarez what was the bug? Did it cause the receiver to report failsafe intermittently? If not - we should probably work around the problem is the SRXL2 driver. WDYT? |
Beta Was this translation helpful? Give feedback.
-
I don't quite remember. I didn't work on the fix for it, but I think it was more related to handling telemetry properly. |
Beta Was this translation helpful? Give feedback.
-
Thing here is that we can't trust channel values if the receiver is reporting that it's not receiving valid signal. Therefore we want the consistent |
Beta Was this translation helpful? Give feedback.
-
Betaflight might not care about signal consistency. It might suffer from the same receiver bug, it just doesn't affect the UX. INAV didn't care about signal consistency either several versions ago, which caused flood of complaints about disarm when flying somewhere out there. As a mitigation the current logic was implemented. @FrankPetrilli if you are willing to help debugging this further, I can build you several firmware variants that would collect various data about what we're getting from the receiver. |
Beta Was this translation helpful? Give feedback.
-
As far as SRXL2 goes, there are specific packet ID's for an actual channel packet, and another ID for FailsafeChannelData. In inav and betaflight, we only process the channel data for RF packet channel data. If the packet is FailsafeChannelData, the channel values are not processed, and we set the RX_FRAME_FAILSAFE bit. This implementation is to give inav full control of how it wants to handle failsafes. If there is a receiver bug causing false frame drop or failsafe bits getting set, I'm not sure how we would fix this in the inav srxl2 driver other than ignoring the 250ms timer for this protocol specifically. We could have it skip frame drop reports, but that specifically seems like a bandage to another issue. |
Beta Was this translation helpful? Give feedback.
-
@MiguelFAlvarez I'm running a slightly-dated DSM2 DX6i, so 22ms is a distinct possibility. As for the receiver firmware version, I'm not seeing an easy way to check, or update. The cable to do so appears to cost as much as the receiver did itself, and wouldn't arrive until the end of the month. Do you know if it's possible to perform the update through some other hardware? I have plenty of microcontrollers lying around that could speak whatever protocol is required. @digitalentity I've compiled a version for my F722 with some plain Thanks, all! |
Beta Was this translation helpful? Give feedback.
-
@FrankPetrilli Unfortunately its not possible to flash through other hardware. The programmer/updater doesn't haven the capability to communicate with generic com ports, though we'd like to have this feature at some point to support updating through FC's and such. It's just currently not a priority. |
Beta Was this translation helpful? Give feedback.
-
Current Behavior
Using a build only slightly branched from HEAD, my quad became stuck in a quasi-ARM mode multiple times, and I'm able to reproduce the issue.
Steps to Reproduce
Expected behavior
ARM flightmode to behave according to the position of the ranges applied, especially to disarm when commanded.
Observed behavior
ARM flightmode engages sometimes when switch is toggled. When it does, it doesn't toggle off, and flight controls are limited to only throttle - roll/pitch/yaw controls do not function, and PID control seems inoperative - the craft does not respond to changes of its attitude. The "Receiver" page shows all input controls moving as expected.
This image shows the craft armed with the control channel 5 clearly set to a disarmed position. When a battery was installed and the issue reproduced, the motors did begin to spin.
In attempting to fix the problem I did the following while the motors spun, all of which had no effect on the problem at hand.
Eventually, the problem stopped itself with seemingly no impetus. I attempted to reproduce the issue and was able to using the procedure above.
Additional information
The F405-SE is attached to a SPM4650 on TX2 via SRXL2. The git diff above disabled softserial on this port, which was interfering with the use of the port for SRXL2.
This same hardware configuration works flawlessly in Betaflight.
Beta Was this translation helpful? Give feedback.
All reactions