 |
Paparazzi UAS
v6.2_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
16 #include "generated/settings.h"
23 #include "generated/flight_plan.h"
25 #include "generated/modules.h"
27 #include <caml/mlvalues.h>
28 #include <caml/memory.h>
44 #define SIM_UPDATE_DL TRUE
49 #if PERIODIC_FREQUENCY != 60
50 #warning "Simple OCaml sim can currently only handle a PERIODIC_FREQUENCY of 60Hz"
53 #if SYS_TIME_FREQUENCY != 120
54 #warning "Simple OCaml sim can currently only handle a SYS_TIME_FREQUENCY of 120Hz"
76 return (t.tv_sec + t.tv_usec / 1e6);
95 ivy_tp.ivy_dl_enabled = Int_val(dl_enabled);
104 for (i = 0; i < COMMANDS_NB; i++) {
105 Store_field(val_commands, i, Val_int(
commands[i]));
108 return Val_int(
commands[COMMAND_THROTTLE]);
113 int n = string_length(
s);
114 char *ss = String_val(
s);
118 for (i = 0; i < n; i++) {
value get_commands(value val_commands)
uint8_t dl_buffer[MSG_SIZE]
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
value set_datalink_message(value s)
pprz_t commands[COMMANDS_NB]
uint16_t datalink_nb_msgs
float vsupply
supply voltage in V
void main_ap_periodic(void)
value sim_sys_time_task(value unit)
needs to be called at SYS_TIME_FREQUENCY
value update_dl_status(value dl_enabled)
Device independent GPS code (interface)
value sim_init(value unit)
struct ivy_transport ivy_tp
IVY transport structure.
value update_bat(value bat)
uint8_t inflight_calib_mode
Handling of messages coming from ground and other A/Cs.
Hardware independent code for commands handling.
struct Electrical electrical
uint8_t link_fbw_fbw_nb_err
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
static void sys_tick_handler(void)
static void DlCheckAndParse(struct link_device *dev, struct transport_tx *trans, uint8_t *buf, bool *msg_available, bool update_dl)
Check for new message and parse.
value sim_periodic_task(value unit)