How to detect a lost Signal and start Failsafe

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

How to detect a lost Signal and start Failsafe

Post by jevermeister »

Hi,

my PPM receiver is not working with the current Failsafe of the MultiWii.

A normal Signal looks like this:
Image
When i Turn of the TX, the Signal of the RX looks like this:
Image

I tried around and found this solution for me, based on the current failsafe routine:

I compare each channel value to an old value, if there is no change, the failsafe counter increases.

Code: Select all

  #if defined(FAILSAFE)
   
   if (rcData[THROTTLE] != lastTHROTTLE || rcData[YAW] != lastYAW || rcData[PITCH] != lastPITCH || rcData[ROLL] != lastROLL)  //have the inputs changed? if yes reset failsafe
   {
     if(failsafeCnt > 20) failsafeCnt -= 20; else{ failsafeActive_Bo =0; failsafeCnt = 0;}   // clear FailSafe counter - added by MIS
          lastTHROTTLE = rcData[THROTTLE];   //Save actual values to last values for comparision
     lastYAW = rcData[YAW];
     lastPITCH = rcData[PITCH];
     lastROLL = rcData[ROLL];
   }
  #endif


A loss of communication is detected in any case, but it is possible (though it is very unlikely) that If you leave the TX alone while in flight, a loss of communication is detected and the Failsafe is started.

Is there another solution to detect a loss with the given input signal of mine?


Thank you

nils
Tnaks a lot.

Post Reply