|
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:
_______________________________________________ Paparazzi-devel mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/paparazzi-devel |
[Prev in Thread] | Current Thread | [Next in Thread] |