Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
baro_amsys.h
Go to the documentation of this file.
1
/*
2
* Driver for a Amsys Barometric Sensor I2C
3
* AMS 5812-0150-A
4
*
5
* Copyright (C) 2010 The Paparazzi Team
6
*
7
* This file is part of paparazzi.
8
*
9
* paparazzi is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation; either version 2, or (at your option)
12
* any later version.
13
*
14
* paparazzi is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
18
*
19
* You should have received a copy of the GNU General Public License
20
* along with paparazzi; see the file COPYING. If not, write to
21
* the Free Software Foundation, 59 Temple Place - Suite 330,
22
* Boston, MA 02111-1307, USA.
23
*/
24
25
#ifndef BARO_AMSYS_H
26
#define BARO_AMSYS_H
27
28
#include "
std.h
"
29
#include "
mcu_periph/i2c.h
"
30
32
#define BARO_AMSYS_DT BARO_AMSYS_READ_PERIODIC_PERIOD
33
34
extern
uint16_t
baro_amsys_adc
;
35
// extern float baro_amsys_offset;
36
extern
bool
baro_amsys_valid
;
37
extern
bool
baro_amsys_enabled
;
38
extern
float
baro_amsys_altitude
;
39
extern
float
baro_amsys_r
;
40
extern
float
baro_amsys_sigma2
;
41
extern
float
baro_filter
;
42
43
extern
struct
i2c_transaction
baro_amsys_i2c_trans
;
44
45
extern
void
baro_amsys_init
(
void
);
46
extern
void
baro_amsys_read_periodic
(
void
);
47
extern
void
baro_amsys_read_event
(
void
);
48
49
#define BaroAmsysEvent() { if (baro_amsys_i2c_trans.status == I2CTransSuccess) baro_amsys_read_event(); }
50
51
#endif // BARO_AMSYS_H
uint16_t
unsigned short uint16_t
Definition:
types.h:16
baro_amsys_i2c_trans
struct i2c_transaction baro_amsys_i2c_trans
Definition:
baro_amsys.c:90
baro_amsys_read_event
void baro_amsys_read_event(void)
Definition:
baro_amsys.c:138
baro_amsys_valid
bool baro_amsys_valid
Definition:
baro_amsys.c:75
baro_amsys_init
void baro_amsys_init(void)
Definition:
baro_amsys.c:97
baro_amsys_sigma2
float baro_amsys_sigma2
Definition:
baro_amsys.c:79
std.h
baro_filter
float baro_filter
Definition:
baro_amsys.c:86
baro_amsys_r
float baro_amsys_r
Definition:
baro_amsys.c:78
i2c_transaction
I2C transaction structure.
Definition:
i2c.h:93
baro_amsys_altitude
float baro_amsys_altitude
Definition:
baro_amsys.c:76
baro_amsys_adc
uint16_t baro_amsys_adc
Definition:
baro_amsys.c:73
baro_amsys_enabled
bool baro_amsys_enabled
Definition:
baro_amsys.c:77
i2c.h
baro_amsys_read_periodic
void baro_amsys_read_periodic(void)
Definition:
baro_amsys.c:118
sw
airborne
modules
sensors
baro_amsys.h
Generated on Tue Feb 1 2022 13:51:16 for Paparazzi UAS by
1.8.17