Difference between revisions of "Subsystem/radio control"

From PaparazziUAV
Jump to: navigation, search
(syntaxhighlight)
(added some info about spektrum (with secondary receiver))
Line 10: Line 10:
  
 
* '''RADIO_CONTROL_LED''': ''1'', ''2'', ''3'', ''none''
 
* '''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).
+
** 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:
 
E.g. if you want to use LED3 to indicate if RC is ok on yapa:
Line 27: Line 27:
  
 
=== PPM ===  
 
=== 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|Radio Control]] file.
+
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|Radio Control XML file]].
  
 
Just specify the appropriate subsystem in your firmware section:
 
Just specify the appropriate subsystem in your firmware section:
Line 40: Line 40:
  
 
=== Spektrum ===
 
=== Spektrum ===
 +
The Spektrum parser does '''NOT''' use the [[Radio_Control|Radio Control xml]] file. Proper Spektrum support is only provied 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)
 +
{{Box Code|conf/airframes/myplane.xml|
 +
<source lang="xml">
 +
  <firmware name="fixedwing or rotorcraft">
 +
    ...
 +
    <subsystem name="radio_control"    type="spektrum">
 +
      <define name="RADIO_MODE" value="RADIO_AUX1"/>
 +
    </subsystem>
 +
  </firmware>
 +
</source>
 +
}}
 +
 +
If you want to use a second Spektrum satellite:
 +
{{Box Code|conf/airframes/myplane.xml|
 +
<source lang="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>
 +
</source>
 +
}}
 +
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:
 +
<source lang="xml"><configure name="RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT" value="UART5"/></source>
  
 
=== Datalink ===
 
=== Datalink ===

Revision as of 13:15, 15 June 2012

Radio Control subsystem

Currently possible Radio Control subsystems are

  • ppm
  • spektrum
  • datalink (fixedwing only)

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:

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 provied 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"/>

Datalink

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 ).