Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
mateksys_3901_l0x.c File Reference
#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"
+ Include dependency graph for mateksys_3901_l0x.c:

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
 

Macro Definition Documentation

◆ MATEKSYS_3901_L0X_COMPENSATE_ROTATION

#define MATEKSYS_3901_L0X_COMPENSATE_ROTATION

Definition at line 58 of file mateksys_3901_l0x.c.

◆ MATEKSYS_3901_L0X_DISTANCE_THRES

#define MATEKSYS_3901_L0X_DISTANCE_THRES

Definition at line 46 of file mateksys_3901_l0x.c.

◆ MATEKSYS_3901_L0X_MOTION_THRES

#define MATEKSYS_3901_L0X_MOTION_THRES

Definition at line 42 of file mateksys_3901_l0x.c.

◆ USE_MATEKSYS_3901_L0X_AGL

#define USE_MATEKSYS_3901_L0X_AGL

Definition at line 50 of file mateksys_3901_l0x.c.

◆ USE_MATEKSYS_3901_L0X_OPTICAL_FLOW

#define USE_MATEKSYS_3901_L0X_OPTICAL_FLOW

Definition at line 54 of file mateksys_3901_l0x.c.

Function Documentation

◆ mateksys3901l0x_event()

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.

+ Here is the call graph for this function:

◆ mateksys3901l0x_init()

◆ mateksys3901l0x_parse()

static void mateksys3901l0x_parse ( uint8_t  byte)
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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mateksys3901l0x_send_optical_flow()

static void mateksys3901l0x_send_optical_flow ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Variable Documentation

◆ mateksys3901l0x

struct Mateksys3901l0X mateksys3901l0x
MATEKSYS_3901_L0X_INITIALIZE
@ MATEKSYS_3901_L0X_INITIALIZE
Definition: mateksys_3901_l0x.h:48