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

driver for the TFMini lidar More...

#include "tfmini.h"
#include "mcu_periph/uart.h"
#include "modules/core/abi.h"
#include "state.h"
#include "pprzlink/messages.h"
#include "modules/datalink/downlink.h"
#include "modules/datalink/telemetry.h"
Include dependency graph for tfmini.c:

Go to the source code of this file.

Macros

#define LIDAR_OFFSET   0.0f
#define LIDAR_HEIGHT   0.0f

Functions

static void tfmini_send_lidar (struct transport_tx *trans, struct link_device *dev)
 Downlink message lidar.
void tfmini_init (void)
 Initialization function.
void tfmini_event (void)
 Lidar event function Receive bytes from the UART port and parse them.
void tfmini_parse (uint8_t byte)
 Parse the lidar bytes 1 by 1.
void tfmini_send_abi (void)

Variables

static float lidar_offset
static float lidar_height
struct TFMini tfmini

Detailed Description

driver for the TFMini lidar

Definition in file tfmini.c.

Macro Definition Documentation

◆ LIDAR_HEIGHT

#define LIDAR_HEIGHT   0.0f

Definition at line 47 of file tfmini.c.

Referenced by tfmini_init().

◆ LIDAR_OFFSET

#define LIDAR_OFFSET   0.0f

Definition at line 42 of file tfmini.c.

Referenced by tfmini_init().

Function Documentation

◆ tfmini_event()

void tfmini_event ( void )

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

Definition at line 102 of file tfmini.c.

References tfmini, TFMINI_INITIALIZE, and tfmini_parse().

Here is the call graph for this function:

◆ tfmini_init()

void tfmini_init ( void )

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)

◆ tfmini_send_abi()

void tfmini_send_abi ( void )

Definition at line 217 of file tfmini.c.

References AGL_LIDAR_TFMINI_ID, get_sys_time_usec(), and tfmini.

Referenced by tfmini_parse().

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

◆ tfmini_send_lidar()

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

Downlink message lidar.

Definition at line 63 of file tfmini.c.

References dev, status, and tfmini.

Referenced by tfmini_init().

Here is the caller graph for this function:

Variable Documentation

◆ lidar_height

float lidar_height
static

Definition at line 51 of file tfmini.c.

Referenced by tfmini_init(), and tfmini_parse().

◆ lidar_offset

float lidar_offset
static

Definition at line 50 of file tfmini.c.

Referenced by tfmini_init(), and tfmini_parse().

◆ tfmini

struct TFMini tfmini
Initial value:
= {
.parse_status = TFMINI_INITIALIZE
}
@ TFMINI_INITIALIZE
Definition tfmini.h:36

Definition at line 53 of file tfmini.c.

Referenced by setLidarDistance_f(), tfmini_event(), tfmini_init(), tfmini_parse(), tfmini_send_abi(), tfmini_send_lidar(), and tfmini_send_lidar().