Subsystem/radio control
Radio Control subsystem
Currently possible Radio Control subsystems are:
Type | Firmwares | Radio file | Notes |
---|---|---|---|
ppm | all | yes | |
spektrum | all | no | |
sbus and sbus_dual | all | ||
datalink | all | ||
superbitrf_rc | rotorcraft only? | No |
Configure Options
If a configure option is not specified the default is used.
- RADIO_CONTROL_LED: 1, 2, 3, none
- default: Already defined according to your board (e.g. none for tiny/twog, 1 for booz and navgo, 2 lisa_m_1.0, 4 lisa_m_2.0).
E.g. if you want to use LED3 to indicate if RC is ok on yapa:
File: conf/airframes/myplane.xml |
<firmware name="fixedwing or rotorcraft">
...
<subsystem name="radio_control" type="ppm">
<configure name="RADIO_CONTROL_LED" value="3"/>
</subsystem>
</firmware>
|
Implementations
PPM
The Paparazzi autopilot can interface directly with the PWM signal from any standard hobby R/C receiver. Signal decoding configuration settings for this are stored in the Radio Control XML file.
Just specify the appropriate subsystem in your firmware section. On some boards, you can also configure the capture pin to use for ppm sum input. Refer to your hardware page for more information.
File: conf/airframes/myplane.xml |
<firmware name="fixedwing or rotorcraft">
...
<subsystem name="radio_control" type="ppm"/>
</firmware>
|
Spektrum
The Spektrum parser does NOT use the Radio Control xml file. Proper Spektrum support is only provided for the STM32 based autopilots.
You need to define which 3-way switch you want to use as mode switch (most commonly the AUX1 switch)
File: conf/airframes/myplane.xml |
<firmware name="fixedwing or rotorcraft">
...
<subsystem name="radio_control" type="spektrum">
<define name="RADIO_MODE" value="RADIO_AUX1"/>
</subsystem>
</firmware>
|
If you want to use a second Spektrum satellite:
File: conf/airframes/myplane.xml |
<firmware name="fixedwing or rotorcraft">
...
<subsystem name="radio_control" type="spektrum">
<define name="RADIO_MODE" value="RADIO_AUX1"/>
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/>
</subsystem>
</firmware>
|
The correct UART for the second receiver is already defined as default for your board. If you want to use a different one you can configure it via:
<configure name="RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT" value="UART5"/>
SBus
SBUS uses an inverted signal. To use it on a normal input you need an inverter. The Apogee autopilot board already has one built in.
You can use the type sbus for a single SBus reciever or sbus_dual for two receivers.
File: conf/airframes/myplane.xml |
<firmware name="fixedwing or rotorcraft">
...
<subsystem name="radio_control" type="sbus">
<configure name="SBUS_PORT" value="UART2"/>
</subsystem>
</firmware>
|
or the dual setup:
File: conf/airframes/myplane.xml |
<firmware name="fixedwing or rotorcraft">
...
<subsystem name="radio_control" type="sbus_dual">
<configure name="SBUS1_PORT" value="UART1"/>
<configure name="SBUS2_PORT" value="UART2"/>
</subsystem>
</firmware>
|
Datalink
File: conf/airframes/myplane.xml |
<firmware name="fixedwing or rotorcraft">
...
<subsystem name="radio_control" type="datalink"/>
</firmware>
|
You can additionally configure a RADIO_CONTROL_DATALINK_LED which is toggled each time a RC command message is received via datalink:
<configure name="RADIO_CONTROL_DATALINK_LED" value="3"/>
SuperbitRF
The SuperbitRF parser does NOT use the Radio Control xml file. Proper SuperbitRF support is only provided for the STM32 based autopilots. SuperbitRF uses the same configuration values as the Spektrum radio control subsystem.
Because the SuperbitRF can't save the bound transmitter in flash, you can define it in your airframe file. You can get the information you need out of the SuperbitRF data packet after binding. An example is shown below:
File: conf/airframes/myplane.xml |
<firmware name="fixedwing or rotorcraft">
...
<subsystem name="radio_control" type="superbitrf_rc">
<define name="RADIO_TRANSMITTER_ID" value="2008496626"/>
<define name="RADIO_TRANSMITTER_CHAN" value="6"/>
<define name="RADIO_TRANSMITTER_PROTOCOL" value="0x01"/>
<define name="RADIO_KILL_SWITCH" value="RADIO_FLAP"/>
</subsystem>
</firmware>
|
Obsolete Classix Autopilot
If you have a Classix Autopilot:
File: conf/airframes/myplane.xml |
ap.CFLAGS += -DRADIO_CONTROL ap.EXTRA_SRCS += radio_control.c $(SRC_ARCH)/ppm_hw.c ap.CFLAGS += -DACTUATORS=\"servos_direct_hw.h\" ap.EXTRA_SRCS += $(SRC_ARCH)/servos_direct_hw.c |
For the Classix, you must specify which pins to use for PWM by adding "-DPWM_SERVO_0, etc." to the line fbw.CFLAGS. This activate the PWM channel.
wiring on classix PWM connector connector LPC shared port PWM1 PWM5 AD1_6 CAP1_3 P0.21 PWM2 PWM3 RXD0 EINT0 P0.1 PWM3 PWM1 TXD0 P0.0 PWM4 PWM6 RXD1 EINT3 P0.9 PWM5 PWM4 TXD1 AD1_1 P0.8 PWM6 PWM2 SSEL0 EINT2 P0.7
PWM1 and PWM6 should be safe. PWM4 and PWM5 should be OK if you're not using UART1 on the FBW processor - same for PWM2 and PWM3 if you're not using UART0 (disable FBW telemetry for that ).