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

Failsafe not working within failsafe_min_distance while position hold activated #4822

Closed
teckel12 opened this issue Jun 11, 2019 · 6 comments

Comments

Projects
None yet
3 participants
@teckel12
Copy link
Contributor

commented Jun 11, 2019

INAV 2.2.0-RC2, Matek F722-SE & Crossfire v2.95 FS set to Cut. See attached log files and diff:

failsafe.zip

In both cases I set home position while in position hold which should result in SET-THR failsafe as it's inside the failsafe_min_distance.

LOG00001.TXT I enable position hold, home reset and disconnect crossfire transmitter module, after 20 seconds (failsafe_off_delay) it cuts motors and drops (all of about 2 feet as it was a test).

LOG00001.TXT I enable position hold, home reset and throw RTH switch which does the expected SET-THR (Land) failsafe which is a quick landing at a throttle position of 1250.

I didn't try it beyond the failsafe_min_distance as it was really windy and I was in my side yard.

@issue-label-bot issue-label-bot bot added the BUG label Jun 11, 2019

@issue-label-bot

This comment has been minimized.

Copy link

commented Jun 11, 2019

Issue-Label Bot is automatically applying the label BUG to this issue, with a confidence of 0.96. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@Jetrell

This comment has been minimized.

Copy link

commented Jun 11, 2019

@teckel12 Do you have the Crossfire FS set to - Failsafe_Pos or Cut ?
Sounds like an odd question. But from my tests it makes a difference.

If I use Cut, mine ignores nav_min_rth_distance. But if I use Faisafe_Pos, it does not trigger FS until its greater than nav_min_rth_distance..

@teckel12

This comment has been minimized.

Copy link
Contributor Author

commented Jun 11, 2019

@Jetrell Sorry, yes, Crossfire FS is set to Cut.

@teckel12

This comment has been minimized.

Copy link
Contributor Author

commented Jun 11, 2019

Looking at the logs, it shows rxSignalReceived being lost which triggers failsafePhase. But it then just seems to wait for 20 seconds before cutting the motors. The 20 seconds matches the delay for turning off the motors during Land failsafe (failsafe_off_delay = 200).

My guess... Because I have position hold turned on at the time of the failsafe, that is taking precedence over what should be the correct failsafe procedure Land. After 20 seconds, it cuts the motors as it should as that's the maximum time allowed to land before cutting motors.

I can't verify this is only happening when inside the failsafe_min_distance. If outside failsafe_min_distance my RTH procedure would be to climb 100 feet before returning home. And I'd rather not test a failsafe drop at 100 feet ;)

@teckel12 teckel12 changed the title Crossfire failsafe doesn't seem to work Failsafe not working within failsafe_min_distance while position hold activated Jun 11, 2019

@digitalentity digitalentity modified the milestones: 2.3, 2.2 Jun 11, 2019

@digitalentity

This comment has been minimized.

Copy link
Member

commented Jun 11, 2019

Found a bug:

set failsafe_procedure = RTH
set failsafe_min_distance = 750
set failsafe_min_distance_procedure = SET-THR

The code checking whether we should disable any navigation modes (for SET-THR) only considers failsafe_procedure which is RTH. However that code doesn't consider that failsafe_min_distance overrides the procedure (in your case SET-THR).

So, in your setup is quad is within failsafe_min_distance navigation is NOT disabled, however failsafe subsystem believes it's executing SET-THR and disarms after 20s.

@teckel12

This comment has been minimized.

Copy link
Contributor Author

commented Jun 11, 2019

Fixed with #4826

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.