Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "mateksys_3901_l0x.h"
#include "mcu_periph/uart.h"
#include "subsystems/abi.h"
#include "state.h"
#include "pprzlink/messages.h"
#include "subsystems/datalink/downlink.h"
#include "subsystems/datalink/telemetry.h"
Go to the source code of this file.
Macros | |
#define | MATEKSYS_3901_L0X_MOTION_THRES |
#define | MATEKSYS_3901_L0X_DISTANCE_THRES |
#define | USE_MATEKSYS_3901_L0X_AGL |
#define | USE_MATEKSYS_3901_L0X_OPTICAL_FLOW |
#define | MATEKSYS_3901_L0X_COMPENSATE_ROTATION |
Functions | |
static void | mateksys3901l0x_parse (uint8_t byte) |
Parse the sensor MSP output bytes 1 by 1. More... | |
static void | mateksys3901l0x_send_optical_flow (struct transport_tx *trans, struct link_device *dev) |
Downlink message flow and lidar (included velocity estimation, not yet tested) More... | |
void | mateksys3901l0x_init (void) |
Initialization function. More... | |
void | mateksys3901l0x_event (void) |
Receive bytes from the UART port and parse them. More... | |
Variables | |
struct Mateksys3901l0X | mateksys3901l0x |
#define MATEKSYS_3901_L0X_COMPENSATE_ROTATION |
Definition at line 58 of file mateksys_3901_l0x.c.
#define MATEKSYS_3901_L0X_DISTANCE_THRES |
Definition at line 46 of file mateksys_3901_l0x.c.
#define MATEKSYS_3901_L0X_MOTION_THRES |
Definition at line 42 of file mateksys_3901_l0x.c.
#define USE_MATEKSYS_3901_L0X_AGL |
Definition at line 50 of file mateksys_3901_l0x.c.
#define USE_MATEKSYS_3901_L0X_OPTICAL_FLOW |
Definition at line 54 of file mateksys_3901_l0x.c.
void mateksys3901l0x_event | ( | void | ) |
Receive bytes from the UART port and parse them.
Definition at line 111 of file mateksys_3901_l0x.c.
References Mateksys3901l0X::device, mateksys3901l0x, mateksys3901l0x_parse(), MATEKSYS_3901_L0X_INITIALIZE, and Mateksys3901l0X::parse_status.
void mateksys3901l0x_init | ( | void | ) |
Initialization function.
Definition at line 92 of file mateksys_3901_l0x.c.
References DefaultPeriodic, Mateksys3901l0X::device, Mateksys3901l0X::distancemm, Mateksys3901l0X::distancemm_quality, mateksys3901l0x, mateksys3901l0x_send_optical_flow(), MATEKSYS_3901_L0X_PARSE_HEAD, Mateksys3901l0X::motion_quality, Mateksys3901l0X::motionX, Mateksys3901l0X::motionY, Mateksys3901l0X::parse_crc, Mateksys3901l0X::parse_status, and register_periodic_telemetry().
|
static |
Parse the sensor MSP output bytes 1 by 1.
Definition at line 121 of file mateksys_3901_l0x.c.
References AGL_LIDAR_MATEKSYS_3901_L0X_ID, byte, Mateksys3901l0X::distance_clean, Mateksys3901l0X::distancemm, Mateksys3901l0X::distancemm_quality, FLOW_OPTICFLOW_MATEKSYS_3901_L0X_ID, get_sys_time_usec(), mateksys3901l0x, MATEKSYS_3901_L0X_COMPENSATE_ROTATION, MATEKSYS_3901_L0X_DISTANCE_THRES, MATEKSYS_3901_L0X_INITIALIZE, MATEKSYS_3901_L0X_MOTION_THRES, MATEKSYS_3901_L0X_PARSE_CHECKSUM, MATEKSYS_3901_L0X_PARSE_DIRECTION, MATEKSYS_3901_L0X_PARSE_DISTANCE_B1, MATEKSYS_3901_L0X_PARSE_DISTANCE_B2, MATEKSYS_3901_L0X_PARSE_DISTANCE_B3, MATEKSYS_3901_L0X_PARSE_DISTANCE_B4, MATEKSYS_3901_L0X_PARSE_DISTANCEQUALITY, MATEKSYS_3901_L0X_PARSE_FUNCTION_ID_B1, MATEKSYS_3901_L0X_PARSE_FUNCTION_ID_B2, MATEKSYS_3901_L0X_PARSE_HEAD, MATEKSYS_3901_L0X_PARSE_HEAD2, MATEKSYS_3901_L0X_PARSE_LENGTH, MATEKSYS_3901_L0X_PARSE_MOTIONQUALITY, MATEKSYS_3901_L0X_PARSE_MOTIONX_B1, MATEKSYS_3901_L0X_PARSE_MOTIONX_B2, MATEKSYS_3901_L0X_PARSE_MOTIONX_B3, MATEKSYS_3901_L0X_PARSE_MOTIONX_B4, MATEKSYS_3901_L0X_PARSE_MOTIONY_B1, MATEKSYS_3901_L0X_PARSE_MOTIONY_B2, MATEKSYS_3901_L0X_PARSE_MOTIONY_B3, MATEKSYS_3901_L0X_PARSE_MOTIONY_B4, MATEKSYS_3901_L0X_PARSE_POINTER, MATEKSYS_3901_L0X_PARSE_SIZE, Mateksys3901l0X::motion_quality, Mateksys3901l0X::motionX, Mateksys3901l0X::motionX_clean, Mateksys3901l0X::motionY, Mateksys3901l0X::motionY_clean, Mateksys3901l0X::parse_crc, Mateksys3901l0X::parse_status, FloatEulers::phi, Mateksys3901l0X::sensor_id, stateGetNedToBodyEulers_f(), FloatEulers::theta, Mateksys3901l0X::time_sec, USE_MATEKSYS_3901_L0X_AGL, USE_MATEKSYS_3901_L0X_OPTICAL_FLOW, Mateksys3901l0X::velocityX, and Mateksys3901l0X::velocityY.
Referenced by mateksys3901l0x_event().
|
static |
Downlink message flow and lidar (included velocity estimation, not yet tested)
Definition at line 73 of file mateksys_3901_l0x.c.
References dev, Mateksys3901l0X::distance_clean, Mateksys3901l0X::distancemm_quality, mateksys3901l0x, Mateksys3901l0X::motion_quality, Mateksys3901l0X::motionX_clean, Mateksys3901l0X::motionY_clean, Mateksys3901l0X::sensor_id, Mateksys3901l0X::time_sec, Mateksys3901l0X::velocityX, and Mateksys3901l0X::velocityY.
Referenced by mateksys3901l0x_init().
struct Mateksys3901l0X mateksys3901l0x |
Definition at line 61 of file mateksys_3901_l0x.c.
Referenced by mateksys3901l0x_event(), mateksys3901l0x_init(), mateksys3901l0x_parse(), and mateksys3901l0x_send_optical_flow().