Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
tfmini.h File Reference

driver for the TFMini lidar More...

#include "std.h"
#include "mcu_periph/i2c.h"
#include "math/pprz_algebra_float.h"
Include dependency graph for tfmini.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  TFMini

Enumerations

enum  TFMiniParseStatus {
  TFMINI_INITIALIZE , TFMINI_PARSE_HEAD , TFMINI_PARSE_HEAD2 , TFMINI_PARSE_DIST_L ,
  TFMINI_PARSE_DIST_H , TFMINI_PARSE_STRENGTH_L , TFMINI_PARSE_STRENGTH_H , TFMINI_PARSE_MODE ,
  TFMINI_PARSE_BYTE7 , TFMINI_PARSE_CHECKSUM
}

Functions

void tfmini_init (void)
 Initialization function.
void tfmini_event (void)
 Lidar event function Receive bytes from the UART port and parse them.
void tfmini_send_abi (void)
void tfmini_parse (uint8_t byte)
 Parse the lidar bytes 1 by 1.

Variables

struct TFMini tfmini

Detailed Description

driver for the TFMini lidar

Definition in file tfmini.h.


Data Structure Documentation

◆ TFMini

struct TFMini

Definition at line 48 of file tfmini.h.

Data Fields
bool compensate_rotation
struct link_device * device
float distance
bool is_rover
uint8_t mode
uint8_t parse_crc
enum TFMiniParseStatus parse_status
uint16_t raw_dist
uint8_t raw_mode
uint16_t raw_strength
uint16_t strength
bool update_agl

Enumeration Type Documentation

◆ TFMiniParseStatus

Enumerator
TFMINI_INITIALIZE 
TFMINI_PARSE_HEAD 
TFMINI_PARSE_HEAD2 
TFMINI_PARSE_DIST_L 
TFMINI_PARSE_DIST_H 
TFMINI_PARSE_STRENGTH_L 
TFMINI_PARSE_STRENGTH_H 
TFMINI_PARSE_MODE 
TFMINI_PARSE_BYTE7 
TFMINI_PARSE_CHECKSUM 

Definition at line 35 of file tfmini.h.

Function Documentation

◆ tfmini_event()

void tfmini_event ( void )
extern

Lidar event function Receive bytes from the UART port and parse them.

Definition at line 102 of file tfmini.c.

References sim_overwrite_lidar(), tfmini, TFMINI_INITIALIZE, and tfmini_parse().

Here is the call graph for this function:

◆ tfmini_init()

void tfmini_init ( void )
extern

Initialization function.

Definition at line 77 of file tfmini.c.

References DefaultPeriodic, LIDAR_HEIGHT, lidar_height, LIDAR_OFFSET, lidar_offset, register_periodic_telemetry(), tfmini, TFMINI_PARSE_HEAD, and tfmini_send_lidar().

Here is the call graph for this function:

◆ tfmini_parse()

void tfmini_parse ( uint8_t byte)
extern

◆ tfmini_send_abi()

void tfmini_send_abi ( void )
extern

Definition at line 217 of file tfmini.c.

References AGL_LIDAR_TFMINI_ID, get_sys_time_usec(), and tfmini.

Referenced by setLidarDistance_f(), and tfmini_parse().

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

Variable Documentation

◆ tfmini