1.8: Serious Failsave Issue

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
User avatar
jevermeister
Posts: 708
Joined: Wed Jul 20, 2011 8:56 am
Contact:

1.8: Serious Failsave Issue

Post by jevermeister »

Hi,
I mentioned this more than once in the past and now I have some new infos.

As you might knwo, I ahd some problems with the failsafe feature since v1.8.

The effect is as follows:
If I turn of my TX (loosing contact) the failsafe starts and starts to land. After the waiting time the motors shutting down. Since 1.8 the motors are try<ing to rearm in cycles, one can see that in the GUI, the throttle is alternating between zero and some value.

This only happens if you loose conenction if throttle < minthrottle and you use the armi/disarm feature via Aux1/aux2.

I tried some fixes but I am not satisfied. The problem is, that the values for all channels are alternating between failsave values and real values, even the Aux1/aux2. So the copter is really trying to arm for milisecond.

I think this is a serious problem.


Nils

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: 1.8: Serious Failsave Issue

Post by Hamburger »

jevermeister wrote:I think this is a serious problem.

only if failsafe kicks in :)
yes it is. who knows about failsafe and arm via aux1/aux2 implementation details?
Hamburger

User avatar
jevermeister
Posts: 708
Joined: Wed Jul 20, 2011 8:56 am
Contact:

Re: 1.8: Serious Failsave Issue

Post by jevermeister »

Hi,
I think I found the reason.

Code: Select all

      } else if (activate[BOXARM] > 0) {
        if ((rcOptions & activate[BOXARM]) && okToArm) armed = 1;      //only rearm if failsafe
        else if (armed) armed = 0;
        rcDelayCommand = 0;
      }
.
.
.
.
    rcOptions = (rcData[AUX1]<1300)   + (1300<rcData[AUX1] && rcData[AUX1]<1700)*2  + (rcData[AUX1]>1700)*4
               +(rcData[AUX2]<1300)*8 + (1300<rcData[AUX2] && rcData[AUX2]<1700)*16 + (rcData[AUX2]>1700)*32;


rcoptions is a few lines later in the code, so if the failsave disarms the copter, the throttle is zero and

Code: Select all

rcOptions & activate[BOXARM]) && okToArm)
rearms it.

Solution one

Code: Select all

      } else if (activate[BOXARM] > 0) {
        if ((rcOptions & activate[BOXARM]) && okToArm && failsafe_warn < 2) armed = 1;      //only rearm if failsafe   


Failsafe_warn is a variable I introduced to show the actual failsafe level. This is used for the buzzer alarm frequency

or put the whole stick input thingy into a if failsafe not active statement.

I have to test it this evening wehen I am home from work and training. I keep you guys updated!

Nils

User avatar
jevermeister
Posts: 708
Joined: Wed Jul 20, 2011 8:56 am
Contact:

Re: 1.8: Serious Failsave Issue

Post by jevermeister »

I found the solution, i already coded and tested it, i tried to commit it into my branch, but server eror again :-(


Nils

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: 1.8: Serious Failsave Issue

Post by Alexinparis »

thank you for this code digging.
I think it's also possible to avoid this effect with the existing variable:

Code: Select all

        if ((rcOptions & activate[BOXARM]) && okToArm && (failsafeCnt <= 5*FAILSAVE_DELAY)) armed = 1;

oyibox
Posts: 5
Joined: Fri Aug 05, 2011 9:05 pm

Even More Serious Failsafe Issue

Post by oyibox »

me too i'm facing a serious problem with Fail safe.

i've kinda 3 fails safe : within the multiwii code, within the quadrino FC and within the Rx/Tx.

i've made a test by shutting off my Tx and...absolutely nothing happened ;(props remain turning at the same speed until i switch back on the Tx.

don't know from where to start, please any help ?

User avatar
jevermeister
Posts: 708
Joined: Wed Jul 20, 2011 8:56 am
Contact:

Re: 1.8: Serious Failsave Issue

Post by jevermeister »

Alexinparis wrote:thank you for this code digging.
I think it's also possible to avoid this effect with the existing variable:

Code: Select all

        if ((rcOptions & activate[BOXARM]) && okToArm && (failsafeCnt <= 5*FAILSAVE_DELAY)) armed = 1;


Alex, your welcome.
I think this solution is more elegant :

Code: Select all

        if (failsafeCnt > 5*(FAILSAVE_DELAY+FAILSAVE_OFF_DELAY)) {          // Turn OFF motors after specified Time (in 0.1sec)
          armed = 0;
          okToArm = 0;                                    //This will prevent the copter to automatically rearm if failsafe shuts it down and prevents to restart accidentely by just reconnect to the tx - you will have to switch off first to rearm

        }


This resets the switch. And also it prevents form starting the copter unwanted just by getting contact again after the failsafe turned it off, i think this is a safety feature we should use.

Nils

Post Reply