Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
|
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"
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 |
Parrot Bebop Sonar driver.
Definition in file sonar_bebop.c.
void sonar_bebop_init | ( | void | ) |
Definition at line 46 of file sonar_bebop.c.
References spi_transaction::dss, spi_transaction::input_buf, spi_transaction::input_length, SonarBebop::meas, SonarBebop::offset, spi_transaction::output_buf, spi_transaction::output_length, spi_transaction::select, sonar_bebop, sonar_bebop_read(), sonar_bebop_spi_d, sonar_bebop_spi_t, sonar_bebop_thread, SPIDss8bit, SPISelectUnselect, SPITransDone, and spi_transaction::status.
|
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().
struct SonarBebop sonar_bebop |
Definition at line 40 of file sonar_bebop.c.
Referenced by sonar_bebop_init(), and sonar_bebop_read().
|
static |
Definition at line 41 of file sonar_bebop.c.
Referenced by sonar_bebop_init().
|
static |
Definition at line 42 of file sonar_bebop.c.
Referenced by sonar_bebop_init(), and sonar_bebop_read().
|
static |
Definition at line 43 of file sonar_bebop.c.
Referenced by sonar_bebop_init().