Fly aways the failsafe and the 9x

 I recently steeped down as moderator so I can address this issue and the BS about it. Over the next few day's I be going over the code and addressing the real issues and possible solutions or not possible solutions. Ones that work or don't work.

 First we need to establish exactly what the APM should do in failsafe and what the safety issues really are. So lets hear the issues cause and effect and we'll get to the bottom of this one way or another. I hear talk about fixes that I don't consider fixes just work arounds. I know that one of them works for the 9x but it doesn't fully address the issue and nothing I have seen so far does.

 I'll be digging out the code and finding the truth myself so lets have at it.

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

Join diydrones

Email me when people reply –

Replies

  • Not sure how this will go as I never really tested it in flight and now I run FrSky I dont need it but...

    I added some user code to watch a "Heart Beat" from a 9X running er9x. It is simple if the heartbeat stops for 10 secs (count 100 on 10hz loop) send a RTL and I also set the LED B to come on to indicate it was triggered (for testing etc).

    uservariables.h

    int heart_beat,count_lost,mode;
    boolean lost;

    usercode

    void userhook_MediumLoop()
    {
    if (heart_beat == g.rc_8.radio_in){
    count_lost++;
    }else
    {
    count_lost=0;
    if (lost){
    lost = false;
    digitalWrite(B_LED_PIN, LED_OFF);
    set_mode(STABILIZE); // control_mode = STABILIZE;
    }
    }
    heart_beat = g.rc_8.radio_in;
    if (count_lost>100){
    lost = true;
    digitalWrite(B_LED_PIN, LED_ON);
    set_mode(RTL); // control_mode = RTL;
    count_lost=100;
    }

    }

    Then on the er9x set up a heart beat on CH8

    as per this link http://postimage.org/image/w0fumpa9n (creds to buzz from http://9xforums.com/forum/viewtopic.php?f=35&t=1054)

    I got to the point of testing the LED comes on meaning the code activates for a failsafe but never tested in the air.

    Hope that helps someone and love to here is someone is brave enough to try

  • Developer

    I posted about my latest work on "single channel fail-safe detection" in the "Kevin Finisterre.." thread to try and give the thread some sanity, but I guess this i a better place for it.

    So here is a repost:

    I had some free time and had a look at the ArduPPM and single channel fail-safe detection. I am not promising anything right now since I haven't finished testing jitter. But I think I found an acceptable compromise that will allow single channel detection on all channels and still maintain good general performance with regard to jitter and stick resolution. Trick was to migrate most of the fail-safe detection to the more timing deterministic PPM output generator, instead of doing it all in the PPM input interrupt.

  • My Naza will unarm if sits on the floor for a few seconds. If you like to fly again you have to rearm.

    Unless you want to fly missions were you land between waypoins, looks like a nice feature to have.

    We dont do so many touch&go with copters, and I prefer to rearm insted of having my copter flying away.

    Pablo

  • I've tried to figure out LEDs on several occasions so I have to say "No" it's not properly documented. It seems there a five different versions, all saying things like add code, and compile in modules or something. I actually gave up thinking it never got added to the APM release. Of course, maybe in the mean time someone has come along and cleaned up the docs and compiled it all in. I dunno. I'd like to add a strobe or two. I have lights in all four corners, but an "Armed" strobe would rock my world. 

    Any hoo..... About the 9x. I have a stock FS-Th9x with the stock 8/9 channel receiver, and so far as I can tell, fail safe doesn't work. First off, "setting" fail safe in the radio, you use the stick. Which you can only set down to 0% throttle. But the APM would see that as my minimum throttle of 1015 or something, which is still in the normal range and won't trigger the APM failsafe properly.

    BUT..... this is all rendered moot as when I turn off my transmitter..... nothing happens. All the channels freeze where they were. So much for the 9x failsafe. I suspect the receiver does not support failsafe, or I'm doing something wrong. 

    So I could set this up then go out of radio range and the copter would just keep on truckin' even though I "setup" failsafe. 

This reply was deleted.

Activity

Jose Araujo liked Jose Araujo's profile
Aug 29
spencer harvey liked spencer harvey's profile
Jul 9
More…