Paparazzi UAS  v5.2.2_stable-0-gd6b9f29
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ppm.h File Reference
#include "std.h"
#include "subsystems/radio_control/ppm_arch.h"
#include "generated/radio.h"
+ Include dependency graph for ppm.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define RADIO_CONTROL_NB_CHANNEL   RADIO_CTL_NB
 Generated code holding the description of a given transmitter. More...
 
#define PPM_PULSE_TYPE_POSITIVE   0
 ppm pulse type : futaba is falling edge clocked whereas JR is rising edge More...
 
#define PPM_PULSE_TYPE_NEGATIVE   1
 
#define RadioControlEvent(_received_frame_handler)
 Event macro with handler callback PPM frame are normalize using the IIR filter. More...
 
#define RssiValid()   TRUE
 RssiValid test macro. More...
 
#define DecodePpmFrame(_ppm_time)
 A valid ppm frame: More...
 

Functions

void ppm_arch_init (void)
 Architecture dependant code. More...
 

Variables

uint16_t ppm_pulses [RADIO_CONTROL_NB_CHANNEL]
 
volatile bool_t ppm_frame_available
 
uint8_t ppm_cur_pulse
 State machine for decoding ppm frames. More...
 
uint32_t ppm_last_pulse_time
 
bool_t ppm_data_valid
 

Macro Definition Documentation

#define DecodePpmFrame (   _ppm_time)

A valid ppm frame:

  • synchro blank
  • correct number of channels
  • synchro blank

Definition at line 97 of file ppm.h.

#define PPM_PULSE_TYPE_NEGATIVE   1

Definition at line 50 of file ppm.h.

#define PPM_PULSE_TYPE_POSITIVE   0

ppm pulse type : futaba is falling edge clocked whereas JR is rising edge

Definition at line 49 of file ppm.h.

#define RADIO_CONTROL_NB_CHANNEL   RADIO_CTL_NB

Generated code holding the description of a given transmitter.

Define number of channels Using generated code radio.h

Definition at line 44 of file ppm.h.

#define RadioControlEvent (   _received_frame_handler)
Value:
{ \
} else { \
NormalizePpmIIR(ppm_pulses,radio_control); \
_received_frame_handler(); \
} \
} \
}
uint8_t frame_cpt
Definition: radio_control.h:54
uint8_t time_since_last_frame
Definition: radio_control.h:51
if(PrimarySpektrumState.SpektrumTimer)--PrimarySpektrumState.SpektrumTimer
#define FALSE
Definition: imu_chimu.h:141
uint16_t ppm_pulses[RADIO_CONTROL_NB_CHANNEL]
Definition: ppm.c:25
uint8_t radio_ok_cpt
Definition: radio_control.h:52
struct RadioControl radio_control
Definition: radio_control.c:25
#define RC_OK
Definition: radio_control.h:45
uint8_t status
Definition: radio_control.h:50
volatile bool_t ppm_frame_available
Definition: ppm.c:26

Event macro with handler callback PPM frame are normalize using the IIR filter.

Definition at line 59 of file ppm.h.

#define RssiValid ( )    TRUE

RssiValid test macro.

This macro has to be defined to test the validity of ppm frame from an other source (ex: GPIO). By default, always true.

Definition at line 88 of file ppm.h.

Function Documentation

Variable Documentation

uint8_t ppm_cur_pulse

State machine for decoding ppm frames.

Definition at line 25 of file ppm_arch.c.

Referenced by ppm_arch_init().

bool_t ppm_data_valid

Definition at line 27 of file ppm_arch.c.

Referenced by ppm_arch_init().

volatile bool_t ppm_frame_available

Definition at line 26 of file ppm.c.

Referenced by ppm_arch_init(), radio_control_impl_init(), and send_ppm().

uint32_t ppm_last_pulse_time

Definition at line 26 of file ppm_arch.c.

Referenced by ppm_arch_init().

Definition at line 25 of file ppm.c.

Referenced by update_rc_channel().