Why not allow switch from LOITER mode to FLIP mode?

I've checked the code (AC 3.3.2) and found it is only supported that switch to FLIP mode when in ACRO, STABILIZE and ALT_HOLD mode before, 

because of this "if" statement in bool flip_init(bool) function in file control_flip.cpp:

if (control_mode != ACRO && control_mode != STABILIZE && control_mode != ALT_HOLD) {
return false;
}

I want to test switch from LOITER to FLIP and then restore back to LOITER, before I test, can somebody tell me the risks in it?

Thanks!

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Unless you change the code it won't do anything.

    I set up a friends tri-copter to use flip mode, and it has to be done from alt-hold (he only had alt hold, pos hold and pos hold with super simple mode) as trying it from pos hold resulted in nothing at all happening.

    I suspect the same result if you try it from any mode other than acro, stabilize or alt hold.

    • Yes. I tried it from LOITER, which seems flip better with nothing worse happened.

  • The modes listed are ones that do NOT use GPS data. Trying to "flip" in loiter can be bad as it will cause EKF issues and positioning issues which will likely cause your craft to head back to china or worse.

    It would be like the worst GPS glitch in history I imagine.

    • Thank you!

      But the "bad" thing you describe will never happen, because the craft is always in China with me.

      • That's one of the funniest replies I've seen on this forum. :)

        I would guess that the devs put that check in there for a reason. Given the big altitude change, it might be an issue with the barometer along with what Craig mentioned.

        If you do try this, please post back with results.

        • I'm always in the mood to watch a good crash video. But in this case I'd feel sorry for him as I am pretty sure a crash would be the result. 

          • I changed the code to allow the mode switch from LOITER to FLIP, and test it outdoors. It seems like the copter flips better than the original version.

  • I could be wrong, but it might be a safety feature that's preventing you switching from Loiter to FLIP mode. However, it should work from another mode such as Stabilize...

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…