Paparazzi UAS  v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
tfmini.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019 Freek van Tienen <freek.v.tienen@gmail.com>
3  *
4  * This file is part of paparazzi.
5  *
6  * paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with paparazzi; see the file COPYING. If not, write to
18  * the Free Software Foundation, 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  *
21  */
22 
27 #ifndef LIDAR_TFMINI_H
28 #define LIDAR_TFMINI_H
29 
30 #include "std.h"
31 #include "mcu_periph/i2c.h"
32 
44 };
45 
46 struct TFMini {
47  struct link_device *device;
53 
55  float distance; // [m]
57  bool update_agl;
59 };
60 
61 extern struct TFMini tfmini;
62 
63 extern void tfmini_init(void);
64 extern void tfmini_event(void);
65 extern void tfmini_downlink(void);
66 
67 #endif /* LIDAR_TFMINI_H */
68 
unsigned short uint16_t
Definition: types.h:16
Definition: tfmini.h:46
struct link_device * device
Definition: tfmini.h:47
enum TFMiniParseStatus parse_status
Definition: tfmini.h:48
uint16_t strength
Definition: tfmini.h:54
uint16_t raw_strength
Definition: tfmini.h:51
uint8_t parse_crc
Definition: tfmini.h:49
uint16_t raw_dist
Definition: tfmini.h:50
float distance
Definition: tfmini.h:55
void tfmini_downlink(void)
TFMiniParseStatus
Definition: tfmini.h:33
struct TFMini tfmini
Definition: tfmini.c:38
bool compensate_rotation
Definition: tfmini.h:58
unsigned char uint8_t
Definition: types.h:14
void tfmini_init(void)
Initialization function.
Definition: tfmini.c:63
bool update_agl
Definition: tfmini.h:57
uint8_t raw_mode
Definition: tfmini.h:52
uint8_t mode
Definition: tfmini.h:56
void tfmini_event(void)
Lidar event function Receive bytes from the UART port and parse them.
Definition: tfmini.c:83
Architecture independent I2C (Inter-Integrated Circuit Bus) API.