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
sonar_bebop.c File Reference

Parrot Bebop Sonar driver. More...

#include "sonar_bebop.h"
#include "generated/airframe.h"
#include "mcu_periph/adc.h"
#include "mcu_periph/spi.h"
#include "subsystems/abi.h"
#include <pthread.h>
#include "subsystems/datalink/downlink.h"
+ Include dependency graph for sonar_bebop.c:

Go to the source code of this file.

Functions

static void * sonar_bebop_read (void *data)
 Read ADC value to update sonar measurement. More...
 
void sonar_bebop_init (void)
 

Variables

struct SonarBebop sonar_bebop
 
static uint8_t sonar_bebop_spi_d [16] = { 0xF0,0xF0,0xF0,0xF0,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }
 
static struct spi_transaction sonar_bebop_spi_t
 
static pthread_t sonar_bebop_thread
 

Detailed Description

Parrot Bebop Sonar driver.

Definition in file sonar_bebop.c.

Function Documentation

static void * sonar_bebop_read ( void *  data)
static

Read ADC value to update sonar measurement.

Definition at line 68 of file sonar_bebop.c.

References adc_enable(), adc_read(), AGL_SONAR_ADC_ID, DefaultChannel, DefaultDevice, SonarBebop::distance, SonarBebop::meas, sonar_bebop, sonar_bebop_spi_t, spi0, spi_submit(), SPITransDone, SPITransSuccess, stateGetPositionEnu_f(), spi_transaction::status, and EnuCoor_f::z.

Referenced by sonar_bebop_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

struct SonarBebop sonar_bebop

Definition at line 40 of file sonar_bebop.c.

Referenced by sonar_bebop_init(), and sonar_bebop_read().

uint8_t sonar_bebop_spi_d[16] = { 0xF0,0xF0,0xF0,0xF0,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }
static

Definition at line 41 of file sonar_bebop.c.

Referenced by sonar_bebop_init().

struct spi_transaction sonar_bebop_spi_t
static

Definition at line 42 of file sonar_bebop.c.

Referenced by sonar_bebop_init(), and sonar_bebop_read().

pthread_t sonar_bebop_thread
static

Definition at line 43 of file sonar_bebop.c.

Referenced by sonar_bebop_init().