Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
tfmini.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2019 Freek van Tienen <freek.v.tienen@gmail.com>
3 * Copyright (C) 2025 Alejandro Rochas <alrochas@ucm.es>
4 *
5 * This file is part of paparazzi.
6 *
7 * paparazzi is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
10 * any later version.
11 *
12 * paparazzi is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with paparazzi; see the file COPYING. If not, write to
19 * the Free Software Foundation, 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
21 *
22 */
23
28#ifndef LIDAR_TFMINI_H
29#define LIDAR_TFMINI_H
30
31#include "std.h"
32#include "mcu_periph/i2c.h"
34
47
63
64extern struct TFMini tfmini;
65
66extern void tfmini_init(void);
67extern void tfmini_event(void);
68extern void tfmini_send_abi(void);
69
70#ifndef USE_NPS
71extern void tfmini_parse(uint8_t byte);
72#else
73extern void sim_overwrite_lidar(void);
74extern void setLidarDistance_f(float distance);
75#endif // USE_NPS
76
77#endif /* LIDAR_TFMINI_H */
78
Architecture independent I2C (Inter-Integrated Circuit Bus) API.
uint16_t foo
Definition main_demo5.c:58
Paparazzi floating point algebra.
bool is_rover
Definition tfmini.h:61
void tfmini_event(void)
Lidar event function Receive bytes from the UART port and parse them.
Definition tfmini.c:102
uint8_t mode
Definition tfmini.h:58
void tfmini_parse(uint8_t byte)
Parse the lidar bytes 1 by 1.
Definition tfmini.c:113
float distance
Definition tfmini.h:57
bool compensate_rotation
Definition tfmini.h:60
bool update_agl
Definition tfmini.h:59
uint8_t raw_mode
Definition tfmini.h:54
uint16_t raw_dist
Definition tfmini.h:52
uint8_t parse_crc
Definition tfmini.h:51
struct link_device * device
Definition tfmini.h:49
uint16_t raw_strength
Definition tfmini.h:53
struct TFMini tfmini
Definition tfmini.c:53
enum TFMiniParseStatus parse_status
Definition tfmini.h:50
void tfmini_send_abi(void)
Definition tfmini.c:217
void tfmini_init(void)
Initialization function.
Definition tfmini.c:77
uint16_t strength
Definition tfmini.h:56
TFMiniParseStatus
Definition tfmini.h:35
@ TFMINI_INITIALIZE
Definition tfmini.h:36
@ TFMINI_PARSE_STRENGTH_L
Definition tfmini.h:41
@ TFMINI_PARSE_HEAD
Definition tfmini.h:37
@ TFMINI_PARSE_DIST_L
Definition tfmini.h:39
@ TFMINI_PARSE_BYTE7
Definition tfmini.h:44
@ TFMINI_PARSE_HEAD2
Definition tfmini.h:38
@ TFMINI_PARSE_STRENGTH_H
Definition tfmini.h:42
@ TFMINI_PARSE_MODE
Definition tfmini.h:43
@ TFMINI_PARSE_CHECKSUM
Definition tfmini.h:45
@ TFMINI_PARSE_DIST_H
Definition tfmini.h:40
void sim_overwrite_lidar(void)
Definition tfmini_nps.c:82
void setLidarDistance_f(float distance)
Set the distance of the lidar This function is used in NPS to set the distance of the lidar.
Definition tfmini_nps.c:123
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.