Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
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 
Infrared::pitch
int16_t pitch
Definition: infrared.h:130
Infrared::top
int16_t top
Definition: infrared.h:131
sim_air_speed
float sim_air_speed
Definition: sim_ir.c:14
infrared
struct Infrared infrared
Definition: infrared.c:30
Infrared::roll
int16_t roll
Definition: infrared.h:129
ir_gain_calib
void ir_gain_calib(void)
Definition: sim_ir.c:16
inttypes.h
infrared.h
set_ir_and_airspeed
value set_ir_and_airspeed(value roll, value front, value top, value air_speed)
Definition: sim_ir.c:20