|
From: | Felix Ruess |
Subject: | Re: [Paparazzi-devel] Paparazzi v.4.0 - Spektrum radio config issue |
Date: | Wed, 14 Nov 2012 20:29:42 +0100 |
Hi Michal,the radio xml file is only used for PPM based systems.The spektrum models have fixed names for the channels/functions: https://github.com/paparazzi/paparazzi/blob/v4.0/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.hIf you want to make an "alias" for one of the names, e.g. use aux2 as kill switch, define it as you already said.<define name="RADIO_MODE" value="RADIO_AUX1"/><define name="RADIO_KILL_SWITCH" value="RADIO_AUX2"/>If you want to reverse a channel:<define name="RADIO_CONTROL_SPEKTRUM_SIGNS" value="{1,-1,-1,-1,1,-1,1,1,1,1,1,1}"/>and change the sign of the channel you want to reverse.Cheers, FelixOn Wed, Nov 14, 2012 at 7:54 PM, Michal Podhradsky <address@hidden> wrote:
Hello guys,
I have a question about the radio config xml file (in /conf/radios).
We are using Spektrum DX7s as a transmitter and one Spektrum satellite receiver. And I had troubles assigning the channels to radio controls (MODE switch and KILL switch).
Our configuration is following:
In the airframe config:
<firmware name="rotorcraft">
<target name="ap" board="lia_1.1">
<subsystem name="radio_control" type="spektrum"/>
...
And the Spektrum radio config file (spektrum is:
<!DOCTYPE radio SYSTEM "radio.dtd">
<radio name="Spektrum" data_min="900" data_max="2100" sync_min ="5000" sync_max ="15000" pulse_type="NEGATIVE">
<channel ctl="left_stick_vert" function="THROTTLE" max="2050" neutral="950" min="950" average="0"/>
<channel ctl="right_stick_horiz" function="ROLL" min="950" neutral="1500" max="2050" average="0"/>
<channel ctl="right_stick_vert" function="PITCH" min="2050" neutral="1500" max="950" average="0"/>
<channel ctl="left_stick_horiz" function="YAW" min="950" neutral="1500" max="2050" average="0"/>
<channel ctl="switch_c" function="UNUSED" min="2050" neutral="1500" max="948" average="1"/>
<channel ctl="switch_g" function="MODE" min="2050" neutral="1500" max="950" average="1"/>
<channel ctl="aux2" function="KILL_SWITCH" min="2050" neutral="1496" max="948" average="1"/>
</radio>
So MODE should be channel 5 and KILL_SWITCH channel 6.
However, neither RADIO_KILL_SWITCH nor RADIO_MODE is defined. The RADIO_MODE is later defined in http://github.com/paparazzi/paparazzi/blob/v4.0/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h/#L62 but the KILL_SWITCH remains undefined.
A workaround is to define both switched in the airframe config file, for example:
<!--define name="RADIO_MODE" value="RADIO_GEAR"/-->
<!--define name="RADIO_KILL_SWITCH" value="RADIO_AUX2"/-->
but it does not seem to be the best option.
There is a spectrum header file http://github.com/paparazzi/paparazzi/blob/v4.0/sw/airborne/subsystems/radio_control/spektrum_dx7se.h but it is not included in compilation.
Also, changing settings in the Spectrum config xml file does not make any difference in radio behavior (e.g. the channels and min/max values stays the same regardless of the config file).
Is this a desired behavior (i.e. moving away from the radio config and define everything in the airframe config or within the code) or is it a problem with compilation settings? How would I assign radio channels to switches in the radio config?
Thanks a lot
Michal
_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
[Prev in Thread] | Current Thread | [Next in Thread] |