|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
16 #include "generated/settings.h"
24 #include "generated/flight_plan.h"
26 #include "generated/modules.h"
28 #include <caml/mlvalues.h>
29 #include <caml/memory.h>
45 #define SIM_UPDATE_DL TRUE
50 #if PERIODIC_FREQUENCY != 60
51 #warning "Simple OCaml sim can currently only handle a PERIODIC_FREQUENCY of 60Hz"
54 #if SYS_TIME_FREQUENCY != 120
55 #warning "Simple OCaml sim can currently only handle a SYS_TIME_FREQUENCY of 120Hz"
68 #if USE_GENERATED_AUTOPILOT
74 modules_periodic_task();
90 #if !USE_GENERATED_AUTOPILOT
101 gettimeofday(&t, &z);
102 return (t.tv_sec + t.tv_usec / 1e6);
121 ivy_tp.ivy_dl_enabled = Int_val(dl_enabled);
130 for (i = 0; i < COMMANDS_NB; i++) {
131 Store_field(val_commands, i, Val_int(
commands[i]));
134 return Val_int(
commands[COMMAND_THROTTLE]);
139 int n = string_length(
s);
140 char *ss = String_val(
s);
144 for (i = 0; i < n; i++) {
156 void *
b __attribute__((unused)),
157 void *
c __attribute__((unused)))
VIC slots used for the LPC2148 define name e g gps UART1_VIC_SLOT e g modem SPI1_VIC_SLOT SPI1 in mcu_periph spi_arch c or spi_slave_hs_arch c(and some others not using the SPI peripheral yet..) I2C0_VIC_SLOT 8 mcu_periph/i2c_arch.c I2C1_VIC_SLOT 9 mcu_periph/i2c_arch.c USB_VIC_SLOT 10 usb
value sim_monitor_task(value unit)
value get_commands(value val_commands)
uint8_t dl_buffer[MSG_SIZE]
value set_datalink_message(value s)
value sim_nav_task(value unit)
uint16_t datalink_nb_msgs
float vsupply
supply voltage in V
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)
void event_task_fbw(void)
void electrical_periodic(void)
struct ivy_transport ivy_tp
IVY transport structure.
value update_bat(value bat)
void navigation_task(void)
Compute desired_course.
static const ShellCommand commands[]
void autopilot_periodic(void)
AP periodic call.
uint8_t inflight_calib_mode
void reporting_task(void)
Send a series of initialisation messages followed by a stream of periodic ones.
void monitor_task(void)
monitor stuff run at 1Hz
void sensors_task(void)
Run at PERIODIC_FREQUENCY (60Hz if not defined)
Handling of messages coming from ground and other A/Cs.
Hardware independent code for commands handling.
struct Electrical electrical
void periodic_task_fbw(void)
uint8_t link_fbw_fbw_nb_err
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)
void adc_buf_channel(void *a, void *b, void *c)
Required by electrical.