Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
infrared_adc.c File Reference

Regroup all functions link to ADC ir. More...

#include <stdlib.h>
#include "subsystems/sensors/infrared_adc.h"
#include "mcu_periph/adc.h"
#include <BOARD_CONFIG>
#include "generated/airframe.h"
+ Include dependency graph for infrared_adc.c:

Go to the source code of this file.

Macros

#define ADC_CHANNEL_IR_NB_SAMPLES   DEFAULT_AV_NB_SAMPLE
 

Functions

void infrared_init (void)
 
void infrared_update (void)
 
void infrared_event (void)
 
void infrared_adc_init (void)
 Initialisation of ir. More...
 
void infrared_adc_update (void)
 Update ir_roll and ir_pitch from ADCs or from simulator message in HITL and SITL modes. More...
 

Variables

static struct adc_buf buf_ir1
 
static struct adc_buf buf_ir2
 
struct Infrared_raw ir_adc
 

Detailed Description

Regroup all functions link to ADC ir.

Definition in file infrared_adc.c.

Macro Definition Documentation

#define ADC_CHANNEL_IR_NB_SAMPLES   DEFAULT_AV_NB_SAMPLE

Definition at line 49 of file infrared_adc.c.

Referenced by infrared_adc_init().

Function Documentation

void infrared_adc_init ( void  )

Initialisation of ir.

Initialize adc_buf_channel

Definition at line 71 of file infrared_adc.c.

References adc_buf_channel(), ADC_CHANNEL_IR_NB_SAMPLES, buf_ir1, buf_ir2, infrared_struct_init(), Infrared_raw::ir3, and ir_adc.

Referenced by infrared_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void infrared_adc_update ( void  )

Update ir_roll and ir_pitch from ADCs or from simulator message in HITL and SITL modes.

Definition at line 92 of file infrared_adc.c.

References adc_buf::av_nb_sample, buf_ir1, buf_ir2, Infrared_raw::ir1, Infrared_raw::ir2, Infrared_raw::ir3, ir_adc, adc_buf::sum, and UpdateIRValue.

Referenced by infrared_update().

+ Here is the caller graph for this function:

void infrared_event ( void  )

Definition at line 66 of file infrared_adc.c.

void infrared_init ( void  )

Definition at line 55 of file infrared_adc.c.

References infrared_adc_init().

+ Here is the call graph for this function:

void infrared_update ( void  )

Definition at line 60 of file infrared_adc.c.

References infrared_adc_update().

+ Here is the call graph for this function:

Variable Documentation

struct adc_buf buf_ir1
static

Definition at line 40 of file infrared_adc.c.

Referenced by infrared_adc_init(), and infrared_adc_update().

struct adc_buf buf_ir2
static

Definition at line 41 of file infrared_adc.c.

Referenced by infrared_adc_init(), and infrared_adc_update().

struct Infrared_raw ir_adc

Definition at line 52 of file infrared_adc.c.

Referenced by infrared_adc_init(), and infrared_adc_update().