Paparazzi UAS
v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
|
driver for the TFMini lidar More...
#include "tfmini.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.
Functions | |
static void | tfmini_parse (uint8_t byte) |
Parse the lidar bytes 1 by 1. More... | |
static void | tfmini_send_lidar (struct transport_tx *trans, struct link_device *dev) |
Downlink message lidar. More... | |
void | tfmini_init (void) |
Initialization function. More... | |
void | tfmini_event (void) |
Lidar event function Receive bytes from the UART port and parse them. More... | |
Variables | |
struct TFMini | tfmini |
void tfmini_event | ( | void | ) |
Lidar event function Receive bytes from the UART port and parse them.
Definition at line 83 of file tfmini.c.
References TFMini::device, TFMini::parse_status, TFMINI_INITIALIZE, and tfmini_parse().
void tfmini_init | ( | void | ) |
Initialization function.
Definition at line 63 of file tfmini.c.
References TFMini::compensate_rotation, DefaultPeriodic, TFMini::device, TFMini::distance, TFMini::parse_status, register_periodic_telemetry(), TFMini::strength, TFMINI_PARSE_HEAD, tfmini_send_lidar(), and TFMini::update_agl.
|
static |
Parse the lidar bytes 1 by 1.
Definition at line 93 of file tfmini.c.
References AGL_LIDAR_TFMINI_ID, byte, TFMini::compensate_rotation, TFMini::distance, get_sys_time_usec(), TFMini::mode, TFMini::parse_crc, TFMini::parse_status, FloatEulers::phi, TFMini::raw_dist, TFMini::raw_mode, TFMini::raw_strength, stateGetNedToBodyEulers_f(), TFMini::strength, TFMINI_INITIALIZE, TFMINI_PARSE_BYTE7, TFMINI_PARSE_CHECKSUM, TFMINI_PARSE_DIST_H, TFMINI_PARSE_DIST_L, TFMINI_PARSE_HEAD, TFMINI_PARSE_HEAD2, TFMINI_PARSE_MODE, TFMINI_PARSE_STRENGTH_H, TFMINI_PARSE_STRENGTH_L, FloatEulers::theta, and TFMini::update_agl.
Referenced by tfmini_event().
|
static |
Downlink message lidar.
Definition at line 50 of file tfmini.c.
References TFMini::distance, TFMini::mode, and TFMini::parse_status.
Referenced by tfmini_init().
struct TFMini tfmini |