Paparazzi UAS  v6.0_unstable-94-gda5b527-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
mateksys_3901_l0x.h File Reference

Driver for the mateksys_3901_l0x sensor via MSP protocol output. More...

#include "std.h"
#include "stdbool.h"
+ Include dependency graph for mateksys_3901_l0x.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Mateksys3901l0X
 

Macros

#define MSP2_IS_SENSOR_MESSAGE(x)   ((x) >= 0x1F00 && (x) <= 0x1FFF)
 
#define MSP2_SENSOR_RANGEFINDER   0x1F01
 
#define MSP2_SENSOR_OPTIC_FLOW   0x1F02
 

Enumerations

enum  Mateksys3901l0XParseStatus {
  MATEKSYS_3901_L0X_INITIALIZE, MATEKSYS_3901_L0X_PARSE_HEAD, MATEKSYS_3901_L0X_PARSE_HEAD2, MATEKSYS_3901_L0X_PARSE_DIRECTION,
  MATEKSYS_3901_L0X_PARSE_LENGTH, MATEKSYS_3901_L0X_PARSE_FUNCTION_ID_B1, MATEKSYS_3901_L0X_PARSE_FUNCTION_ID_B2, MATEKSYS_3901_L0X_PARSE_SIZE,
  MATEKSYS_3901_L0X_PARSE_POINTER, MATEKSYS_3901_L0X_PARSE_DISTANCEQUALITY, 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_MOTIONQUALITY, 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_MOTIONX_B1,
  MATEKSYS_3901_L0X_PARSE_MOTIONX_B2, MATEKSYS_3901_L0X_PARSE_MOTIONX_B3, MATEKSYS_3901_L0X_PARSE_MOTIONX_B4, MATEKSYS_3901_L0X_PARSE_CHECKSUM
}
 

Functions

void mateksys3901l0x_init (void)
 Initialization function. More...
 
void mateksys3901l0x_event (void)
 Receive bytes from the UART port and parse them. More...
 
void mateksys3901l0x_downlink (void)
 
void mateksys_3901_l0x_scale_X (float scalex)
 Scale the Flow X. More...
 
void mateksys_3901_l0x_scale_Y (float scaley)
 Scale the Flow Y. More...
 

Variables

struct Mateksys3901l0X mateksys3901l0x
 

Detailed Description

Driver for the mateksys_3901_l0x sensor via MSP protocol output.

Driver for the mateksys_3901_l0x sensor via MSPx protocol output.

Definition in file mateksys_3901_l0x.h.


Data Structure Documentation

struct Mateksys3901l0X

Definition at line 72 of file mateksys_3901_l0x.h.

+ Collaboration diagram for Mateksys3901l0X:
Data Fields
struct link_device * device
float distance_compensated
float distancemm
uint8_t distancemm_quality
int32_t distancemm_temp
uint8_t motion_quality
int32_t motionX
int32_t motionX_temp
int32_t motionY
int32_t motionY_temp
uint8_t parse_crc
enum Mateksys3901l0XParseStatus parse_status
float scaler_x
float scaler_y
uint8_t sensor_id
float time_usec
float velocityX
float velocityY

Macro Definition Documentation

#define MSP2_IS_SENSOR_MESSAGE (   x)    ((x) >= 0x1F00 && (x) <= 0x1FFF)

Definition at line 40 of file mateksys_3901_l0x.h.

#define MSP2_SENSOR_OPTIC_FLOW   0x1F02

Definition at line 43 of file mateksys_3901_l0x.h.

#define MSP2_SENSOR_RANGEFINDER   0x1F01

Definition at line 42 of file mateksys_3901_l0x.h.

Enumeration Type Documentation

Enumerator
MATEKSYS_3901_L0X_INITIALIZE 
MATEKSYS_3901_L0X_PARSE_HEAD 
MATEKSYS_3901_L0X_PARSE_HEAD2 
MATEKSYS_3901_L0X_PARSE_DIRECTION 
MATEKSYS_3901_L0X_PARSE_LENGTH 
MATEKSYS_3901_L0X_PARSE_FUNCTION_ID_B1 
MATEKSYS_3901_L0X_PARSE_FUNCTION_ID_B2 
MATEKSYS_3901_L0X_PARSE_SIZE 
MATEKSYS_3901_L0X_PARSE_POINTER 
MATEKSYS_3901_L0X_PARSE_DISTANCEQUALITY 
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_MOTIONQUALITY 
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_MOTIONX_B1 
MATEKSYS_3901_L0X_PARSE_MOTIONX_B2 
MATEKSYS_3901_L0X_PARSE_MOTIONX_B3 
MATEKSYS_3901_L0X_PARSE_MOTIONX_B4 
MATEKSYS_3901_L0X_PARSE_CHECKSUM 

Definition at line 45 of file mateksys_3901_l0x.h.

Function Documentation

void mateksys3901l0x_downlink ( void  )
void mateksys3901l0x_event ( void  )

Receive bytes from the UART port and parse them.

Definition at line 151 of file mateksys_3901_l0x.c.

References Mateksys3901l0X::device, mateksys3901l0x_parse(), MATEKSYS_3901_L0X_INITIALIZE, and Mateksys3901l0X::parse_status.

+ Here is the call graph for this function:

void mateksys_3901_l0x_scale_X ( float  scalex)

Scale the Flow X.

Definition at line 135 of file mateksys_3901_l0x.c.

References Mateksys3901l0X::scaler_x.

void mateksys_3901_l0x_scale_Y ( float  scaley)

Scale the Flow Y.

Definition at line 143 of file mateksys_3901_l0x.c.

References Mateksys3901l0X::scaler_y.

Variable Documentation

struct Mateksys3901l0X mateksys3901l0x

Definition at line 78 of file mateksys_3901_l0x.c.