Paparazzi UAS
v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
|
#include "modules/sensors/opticflow_pmw3901.h"
#include "subsystems/abi.h"
#include "subsystems/datalink/downlink.h"
#include "generated/modules.h"
#include "state.h"
#include "std.h"
#include <math.h>
Go to the source code of this file.
Macros | |
#define | OPTICFLOW_PMW3901_SENSOR_ANGLE 270 |
#define | OPTICFLOW_PMW3901_SUBPIXEL_FACTOR 100 |
#define | OPTICFLOW_PMW3901_STD_PX 50 |
#define | OPTICFLOW_PMW3901_AGL_ID ABI_BROADCAST |
#define | OPTICFLOW_PMW3901_AGL_TIMEOUT_US 500000 |
Functions | |
static void | agl_cb (uint8_t sender_id, uint32_t stamp, float distance) |
static bool | agl_valid (uint32_t at_ts) |
static void | opticflow_pmw3901_publish (int16_t delta_x, int16_t delta_y, uint32_t ts_usec) |
void | opticflow_pmw3901_init (void) |
void | opticflow_pmw3901_periodic (void) |
void | opticflow_pmw3901_event (void) |
Variables | |
struct opticflow_pmw3901_t | of_pmw |
abi_event | agl_ev |
static float | agl_dist |
static uint32_t | agl_ts |
Definition in file opticflow_pmw3901.c.
#define OPTICFLOW_PMW3901_AGL_ID ABI_BROADCAST |
Definition at line 52 of file opticflow_pmw3901.c.
Referenced by opticflow_pmw3901_init().
#define OPTICFLOW_PMW3901_AGL_TIMEOUT_US 500000 |
Definition at line 57 of file opticflow_pmw3901.c.
Referenced by opticflow_pmw3901_init().
#define OPTICFLOW_PMW3901_SENSOR_ANGLE 270 |
Definition at line 40 of file opticflow_pmw3901.c.
Referenced by opticflow_pmw3901_init().
#define OPTICFLOW_PMW3901_STD_PX 50 |
Definition at line 48 of file opticflow_pmw3901.c.
Referenced by opticflow_pmw3901_init().
#define OPTICFLOW_PMW3901_SUBPIXEL_FACTOR 100 |
Definition at line 44 of file opticflow_pmw3901.c.
Referenced by opticflow_pmw3901_init().
Definition at line 68 of file opticflow_pmw3901.c.
Referenced by opticflow_pmw3901_init().
|
static |
Definition at line 74 of file opticflow_pmw3901.c.
References opticflow_pmw3901_t::agl_timeout, agl_ts, and of_pmw.
Referenced by opticflow_pmw3901_publish().
void opticflow_pmw3901_event | ( | void | ) |
Definition at line 184 of file opticflow_pmw3901.c.
References get_sys_time_usec(), of_pmw, opticflow_pmw3901_publish(), opticflow_pmw3901_t::pmw, pmw3901_data_available(), pmw3901_event(), and pmw3901_get_data().
void opticflow_pmw3901_init | ( | void | ) |
Definition at line 166 of file opticflow_pmw3901.c.
References agl_cb(), opticflow_pmw3901_t::agl_timeout, of_pmw, OPTICFLOW_PMW3901_AGL_ID, OPTICFLOW_PMW3901_AGL_TIMEOUT_US, OPTICFLOW_PMW3901_SENSOR_ANGLE, OPTICFLOW_PMW3901_STD_PX, OPTICFLOW_PMW3901_SUBPIXEL_FACTOR, opticflow_pmw3901_t::pmw, pmw3901_init(), pmw3901_t::rad_per_px, opticflow_pmw3901_t::sensor_angle, opticflow_pmw3901_t::std_px, and opticflow_pmw3901_t::subpixel_factor.
void opticflow_pmw3901_periodic | ( | void | ) |
Definition at line 178 of file opticflow_pmw3901.c.
References of_pmw, opticflow_pmw3901_t::pmw, pmw3901_is_idle(), and pmw3901_start_read().
Definition at line 81 of file opticflow_pmw3901.c.
References agl_dist, agl_valid(), DefaultChannel, DefaultDevice, FLOW_OPTICFLOW_PMW3901_ID, of_pmw, FloatRates::p, opticflow_pmw3901_t::pmw, FloatRates::q, pmw3901_t::rad_per_px, s, opticflow_pmw3901_t::sensor_angle, stateGetBodyRates_f(), opticflow_pmw3901_t::std_px, opticflow_pmw3901_t::subpixel_factor, and VEL_OPTICFLOW_PMW3901_ID.
Referenced by opticflow_pmw3901_event().
|
static |
Definition at line 64 of file opticflow_pmw3901.c.
Referenced by opticflow_pmw3901_publish().
abi_event agl_ev |
Definition at line 63 of file opticflow_pmw3901.c.
|
static |
Definition at line 65 of file opticflow_pmw3901.c.
Referenced by agl_valid().
struct opticflow_pmw3901_t of_pmw |
Definition at line 61 of file opticflow_pmw3901.c.
Referenced by agl_valid(), opticflow_pmw3901_event(), opticflow_pmw3901_init(), opticflow_pmw3901_periodic(), and opticflow_pmw3901_publish().