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
sonar_adc.h File Reference

simple driver to deal with one sonar sensor on ADC More...

#include "std.h"
+ Include dependency graph for sonar_adc.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  SonarAdc
 

Functions

void sonar_adc_init (void)
 
void sonar_adc_read (void)
 Read ADC value to update sonar measurement. More...
 

Variables

struct SonarAdc sonar_adc
 

Detailed Description

simple driver to deal with one sonar sensor on ADC

Definition in file sonar_adc.h.

Function Documentation

void sonar_adc_init ( void  )

Definition at line 56 of file sonar_adc.c.

References adc_buf_channel(), DEFAULT_AV_NB_SAMPLE, SonarAdc::meas, SonarAdc::offset, sonar_adc, sonar_adc_buf, and SONAR_OFFSET.

+ Here is the call graph for this function:

void sonar_adc_read ( void  )

Read ADC value to update sonar measurement.

Definition at line 67 of file sonar_adc.c.

References AGL_SONAR_ADC_ID, adc_buf::av_nb_sample, DefaultChannel, DefaultDevice, SonarAdc::distance, SonarAdc::meas, SonarAdc::offset, sonar_adc, sonar_adc_buf, SONAR_SCALE, stateGetPositionEnu_f(), adc_buf::sum, and EnuCoor_f::z.

+ Here is the call graph for this function:

Variable Documentation

struct SonarAdc sonar_adc

Definition at line 50 of file sonar_adc.c.

Referenced by sonar_adc_init(), and sonar_adc_read().