Difference between revisions of "Subsystem/radio control"

From PaparazziUAV
Jump to: navigation, search
m
(syntaxhighlight)
Line 14: Line 14:
 
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:
 
{{Box Code|conf/airframes/myplane.xml|
 
{{Box Code|conf/airframes/myplane.xml|
<pre>
+
<source lang="xml">
 
   <firmware name="fixedwing or rotorcraft">
 
   <firmware name="fixedwing or rotorcraft">
 
     ...
 
     ...
Line 21: Line 21:
 
     </subsystem>
 
     </subsystem>
 
   </firmware>
 
   </firmware>
</pre>
+
</source>
 
}}
 
}}
  
Line 31: Line 31:
 
Just specify the appropriate subsystem in your firmware section:
 
Just specify the appropriate subsystem in your firmware section:
 
{{Box Code|conf/airframes/myplane.xml|
 
{{Box Code|conf/airframes/myplane.xml|
<pre>
+
<source lang="xml">
 
   <firmware name="fixedwing or rotorcraft">
 
   <firmware name="fixedwing or rotorcraft">
 
     ...
 
     ...
 
     <subsystem name="radio_control"    type="ppm"/>
 
     <subsystem name="radio_control"    type="ppm"/>
 
   </firmware>
 
   </firmware>
</pre>
+
</source>
 
}}
 
}}
  

Revision as of 16:00, 4 March 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).

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

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