paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] Spektrum Receiver & patching main_ap.c/autopilot.h


From: Eduardo lavratti
Subject: Re: [Paparazzi-devel] Spektrum Receiver & patching main_ap.c/autopilot.h
Date: Thu, 14 Jun 2012 22:28:16 +0000

Order an turnigy 9x and use hacked software and uhf radio modules.

my hk9x have 14 channel and 2 3 position switch and 1 8 position switch.

I never order an Spektrum radio again




Date: Thu, 14 Jun 2012 22:17:29 +0100
From: address@hidden
To: address@hidden
Subject: Re: [Paparazzi-devel] Spektrum Receiver & patching main_ap.c/autopilot.h

I got it to work.

Quick summary.
The Spektrum DX5e and possibly other entry level radios don't have a three way switch for mode selection.

The workaround is to combine two regular throw switches.

One will switch between MANUAL and AUTO
      <define name="RADIO_MODE" value="RADIO_GEAR"/>
And the other one will, in case the MODE switch is on AUTO select between the different AUTO MODES.
      <define name="RADIO_AUTO_MODE" value="RADIO_AUX1"/>

This way CH 5 in position 1 means MANUAL.
With CH 5 in position 0 trainer in normal position means AUTO2 with trainer switch pulled AUTO1.

It might obviously be convenient to replace the trainer switch with a bistable version.


As for the code. Thanks Gareth and Felix for the inspiration and clarification.
I re-used the TRESHOLD (typo?) mechanism which divides the range in upper and lower quarters. I guess that makes still sense even though the divider probably lies somewhere between min and max. A switch should be well in that range in either position.

Also, I did not put the _expression_ in a macro like PPRZ_MODE_OF_PULSE(). I guess that is just not worth it.


I can document that in the wiki. If you are happy with it.
https://github.com/paparazzi/paparazzi/pull/216

On 14/06/12 16:06, Tilman Baumann wrote:
I suppose that is all happening in
return ModeUpdate(pprz_mode, PPRZ_MODE_OF_PULSE(fbw_state->channels[RADIO_MODE]));
in sw/airborne/firmwares/fixedwing/main_ap.c: pprz_mode_update()

I like the idea. But at the same time I'm wondering how that could be done in a way that has any chance upstream.
How does rc_settings play into this? I don't quite understand how that works


_______________________________________________ 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]