Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
sim_enose.c
Go to the documentation of this file.
1
#include "
enose/enose.h
"
2
3
uint8_t
enose_status
;
4
uint8_t
enose_heat
[
ENOSE_NB_SENSOR
];
5
uint16_t
enose_val
[
ENOSE_NB_SENSOR
];
6
uint16_t
enose_PID_val
;
7
8
uint16_t
nominal_val
[
ENOSE_NB_SENSOR
] = {1500, 1500, 4000};
9
uint16_t
min_val
[
ENOSE_NB_SENSOR
] = {1100, 1200, 2500};
10
11
void
enose_init
(
void
)
12
{
13
int
i;
14
for
(i = 0; i <
ENOSE_NB_SENSOR
; i++) {
15
enose_val
[i] =
nominal_val
[i];
16
}
17
}
18
void
enose_set_heat
(
uint8_t
no_sensor,
uint8_t
value
) { }
19
void
enose_periodic
(
void
)
20
{
21
int
i;
22
for
(i = 0; i <
ENOSE_NB_SENSOR
; i++) {
23
if
(
enose_val
[i] <
min_val
[i]) {
24
enose_val
[i] =
min_val
[i];
25
}
26
int
d =
nominal_val
[i] -
enose_val
[i];
27
enose_val[i] += d / 10.;
28
}
29
}
uint16_t
unsigned short uint16_t
Definition:
types.h:16
min_val
uint16_t min_val[ENOSE_NB_SENSOR]
Definition:
sim_enose.c:9
value
uint16_t value
Definition:
adc_arch.c:586
enose_status
uint8_t enose_status
Definition:
sim_enose.c:3
enose_set_heat
void enose_set_heat(uint8_t no_sensor, uint8_t value)
Definition:
sim_enose.c:18
enose_val
uint16_t enose_val[ENOSE_NB_SENSOR]
Definition:
sim_enose.c:5
enose.h
enose_periodic
void enose_periodic(void)
Definition:
sim_enose.c:19
enose_init
void enose_init(void)
Definition:
sim_enose.c:11
uint8_t
unsigned char uint8_t
Definition:
types.h:14
ENOSE_NB_SENSOR
#define ENOSE_NB_SENSOR
Definition:
enose.h:6
enose_PID_val
uint16_t enose_PID_val
Definition:
sim_enose.c:6
enose_heat
uint8_t enose_heat[ENOSE_NB_SENSOR]
Definition:
sim_enose.c:4
nominal_val
uint16_t nominal_val[ENOSE_NB_SENSOR]
Definition:
sim_enose.c:8
sw
airborne
arch
sim
modules
enose
sim_enose.c
Generated on Tue Jun 21 2016 14:01:10 for Paparazzi UAS by
1.8.8