14 #include "generated/settings.h"
21 #include "generated/flight_plan.h"
23 #include "generated/modules.h"
25 #include <caml/mlvalues.h>
26 #include <caml/memory.h>
40 #define SIM_UPDATE_DL TRUE
45 #if PERIODIC_FREQUENCY != 60
46 #warning "Simple OCaml sim can currently only handle a PERIODIC_FREQUENCY of 60Hz"
49 #if SYS_TIME_FREQUENCY != 120
50 #warning "Simple OCaml sim can currently only handle a SYS_TIME_FREQUENCY of 120Hz"
72 return (t.tv_sec + t.tv_usec / 1e6);
91 ivy_tp.ivy_dl_enabled = Int_val(dl_enabled);
100 for (i = 0; i < COMMANDS_NB; i++) {
101 Store_field(val_commands, i, Val_int(
commands[i]));
104 return Val_int(
commands[COMMAND_THROTTLE]);
109 int n = string_length(
s);
110 char *ss = (
char *)String_val(
s);
114 for (i = 0; i < n; i++) {
Core autopilot interface common to all firmwares.
static void sys_tick_handler(void)
pprz_t commands[COMMANDS_NB]
Hardware independent code for commands handling.
Handling of messages coming from ground and other A/Cs.
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.
struct Electrical electrical
float vsupply
supply voltage in V
Vertical control for fixed wing vehicles.
Fixed wing horizontal control.
Device independent GPS code (interface)
struct ivy_transport ivy_tp
IVY transport structure.
void main_ap_periodic(void)
uint8_t dl_buffer[MSG_SIZE]
bool dl_msg_available
Flag provided to control calls to dl_parse_msg.
Fixedwing Navigation library.
uint8_t link_fbw_fbw_nb_err
value update_dl_status(value dl_enabled)
value sim_periodic_task(value unit)
value sim_init(value unit)
value update_bat(value bat)
uint8_t inflight_calib_mode
value get_commands(value val_commands)
value sim_sys_time_task(value unit)
needs to be called at SYS_TIME_FREQUENCY
value set_datalink_message(value s)
Periodic telemetry system header (includes downlink utility and generated code).
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.