Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
sim_ir.c
Go to the documentation of this file.
1 
8 #include <inttypes.h>
10 #include "generated/airframe.h"
11 
12 #include <caml/mlvalues.h>
13 
15 
16 void ir_gain_calib(void)
17 {
18 }
19 
21  value roll __attribute__((unused)),
22  value front __attribute__((unused)),
23  value top __attribute__((unused)),
24  value air_speed
25 )
26 {
27  // USE_INFRARED : Stupid hack, since sim always calls this function,
28  // but we don't always have an infrared module
29 #if USE_INFRARED
30  infrared.roll = Int_val(roll);
31  infrared.pitch = Int_val(front);
32  infrared.top = Int_val(top);
33 #endif
34  sim_air_speed = Double_val(air_speed);
35  return Val_unit;
36 }
37 
struct Infrared infrared
Definition: infrared.c:30
int16_t top
Definition: infrared.h:131
float sim_air_speed
Definition: sim_ir.c:14
void ir_gain_calib(void)
Definition: sim_ir.c:16
int16_t roll
Definition: infrared.h:129
int16_t pitch
Definition: infrared.h:130
value set_ir_and_airspeed(value roll, value front, value top, value air_speed)
Definition: sim_ir.c:20