paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] Spektrum Receiver


From: Gareth Roberts
Subject: Re: [Paparazzi-devel] Spektrum Receiver
Date: Wed, 13 Jun 2012 19:43:44 +0100
User-agent: Opera Mail/11.64 (Linux)

Hi Tilman,

I have a bet going to be flying on the 24th. And it does not look good.

No problem.  Nearly there.

btw. I just had a super braindead idea. If I fly three channel ( I have a flying wing that I could use) I could use the yaw channel for a switch. Just with a switchable resistor divider instead of the yaw poti.

I believe I've been able to patch fixedwing to use two channels to control mode. This code is not tested, I think it's right but make sure you test it (a lot!) on the ground.

This way, you can just replace your momentary switch with a normal one or hold it down to access AUTO2.

The logic is:
Both switches same position (both off or on): Manual
Left switch on, right off: AUTO1
Right on, left off: AUTO2

I've pushed to https://github.com/blutack/paparazzi/tree/double_mode_switch
The relevant commit is https://github.com/blutack/paparazzi/commit/5a552ba5695f8d150a6812c69e97c5af1be9424e

You can also modify your local copy by hand, by replacing the function autopilot_process_radio_control in
sw/airborne/firmwares/fixedwing/autopilot.h with the function below.

static inline void autopilot_process_radio_control ( void ) {
  //pprz_mode = PPRZ_MODE_OF_PULSE(radio_control.values[RADIO_MODE]);
        #pragma message "WARNING! USING UNTESTED DOUBLE SWITCH MODE CONTROL"
if ((radio_control.values[RADIO_MODE] < TRESHOLD1) && (radio_control.values[RADIO_GAIN1] < TRESHOLD1)) {
                pprz_mode = PPRZ_MODE_MANUAL;
} else if ((radio_control.values[RADIO_MODE] > TRESHOLD2) && (radio_control.values[RADIO_GAIN1] < TRESHOLD1)) {
                pprz_mode = PPRZ_MODE_AUTO1;
} else if ((radio_control.values[RADIO_GAIN1] > TRESHOLD2) && (radio_control.values[RADIO_MODE] < TRESHOLD1)) {
                pprz_mode = PPRZ_MODE_AUTO2;
        } else {
                pprz_mode = PPRZ_MODE_MANUAL;
        }
}

As I said, I haven't tested this. Please don't hold me responsible if it destroys your plane. It would be nice to do this via a module, but I don't believe it's possible.

Cheers,
Gareth

On Wed, 13 Jun 2012 17:30:55 +0100, Tilman Baumann <address@hidden> wrote:

On 13/06/12 17:24, Gareth Roberts wrote:
Hi Tilman,

I suppose you added the V8R7-SP receiver to the list because it is compatible and has ppm?

Yes. I use TFR4-B's (FAAST compatible receiver with PPM output), with a Futaba T8FG transmitter.
But for the FAAST compat stuff, the TX is expensive.
Ah, I thought it is Turnigy compatible.

But I'm not sure what it will mean. If you could perhaps help me make sense of it.
Huh, thanks for digging this out.


Wow, that is a bit. Will read that later.

btw. I just had a super braindead idea. If I fly three channel ( I have a flying wing that I could use) I could use the yaw channel for a switch. Just with a switchable resistor divider instead of the yaw poti.

Perhaps if I get desperate enough...

I have a bet going to be flying on the 24th. And it does not look good.
And I don't have the budget to throw money at the problem and get a proper transmitter.

_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]