Paparazzi UAS  v5.2.2_stable-0-gd6b9f29
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures 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 
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  int i;
13  for(i = 0; i < ENOSE_NB_SENSOR; i++)
14  enose_val[i] = nominal_val[i];
15 }
16 void enose_set_heat(uint8_t no_sensor, uint8_t value) { }
17 void enose_periodic( void ) {
18  int i;
19  for(i = 0; i < ENOSE_NB_SENSOR; i++) {
20  if (enose_val[i] < min_val[i])
21  enose_val[i] = min_val[i];
22  int d = nominal_val[i]- enose_val[i];
23  enose_val[i] += d / 10.;
24  }
25 }
unsigned short uint16_t
Definition: types.h:16
uint16_t min_val[ENOSE_NB_SENSOR]
Definition: sim_enose.c:9
uint16_t value
Definition: adc_arch.c:585
uint8_t enose_status
Definition: sim_enose.c:3
void enose_set_heat(uint8_t no_sensor, uint8_t value)
Definition: sim_enose.c:16
uint16_t enose_val[ENOSE_NB_SENSOR]
Definition: sim_enose.c:5
void enose_periodic(void)
Definition: sim_enose.c:17
void enose_init(void)
Definition: sim_enose.c:11
unsigned char uint8_t
Definition: types.h:14
#define ENOSE_NB_SENSOR
Definition: enose.h:13
uint16_t enose_PID_val
Definition: sim_enose.c:6
uint8_t enose_heat[ENOSE_NB_SENSOR]
Definition: sim_enose.c:4
uint16_t nominal_val[ENOSE_NB_SENSOR]
Definition: sim_enose.c:8