40 #include "generated/airframe.h"
43 #ifndef SYS_ID_DOUBLET_AXES
44 #define SYS_ID_DOUBLET_AXES {COMMAND_ROLL,COMMAND_PITCH,COMMAND_YAW,COMMAND_THRUST}
47 #ifndef SYS_ID_DOUBLET_ENABLED
48 #define SYS_ID_DOUBLET_ENABLED TRUE
51 #ifdef SYS_ID_DOUBLET_RADIO_CHANNEL
53 pprz_t previous_radio_value_doublet = 0;
71 #define SYS_ID_DOUBLET_NB_AXES sizeof SYS_ID_ACTIVE_DOUBLET_AXES / sizeof SYS_ID_ACTIVE_DOUBLET_AXES[0]
114 #ifdef DOUBLET_RADIO_CHANNEL
154 #ifdef SYS_ID_DOUBLET_RADIO_CHANNEL
156 if (previous_radio_value_doublet < 1750)
165 if (previous_radio_value_doublet > 1750)
190 #if SYS_ID_DOUBLET_ENABLED
void doublet_init(struct doublet_t *doublet, float length_s, float extra_waiting_time_s, float current_time_s, uint8_t mod)
bool doublet_is_running(struct doublet_t *doublet, float current_time_s)
void doublet_reset(struct doublet_t *doublet, float current_time_s)
float doublet_update(struct doublet_t *doublet, float current_time_s)
Initialize with doublet_init.
struct RadioControl radio_control
Generic interface for radio control modules.
pprz_t values[RADIO_CONTROL_NB_CHANNEL]
static uint8_t mode
mode holds the current sonar mode mode = 0 used at high altitude, uses 16 wave patterns mode = 1 used...
static const struct usb_device_descriptor dev
static pprz_t current_doublet_values[SYS_ID_DOUBLET_NB_AXES]
static struct doublet_t doublet
void sys_id_doublet_activate_handler(uint8_t activate)
static void send_doublet(struct transport_tx *trans, struct link_device *dev)
float doublet_extra_waiting_time_s
static void set_current_doublet_values(void)
void sys_id_doublet_add_values(bool UNUSED motors_on, bool UNUSED override_on, pprz_t UNUSED in_cmd[])
void sys_id_doublet_init(void)
#define SYS_ID_DOUBLET_AXES
#define SYS_ID_DOUBLET_NB_AXES
void sys_id_doublet_axis_handler(uint8_t axis)
void sys_id_doublet_run(void)
uint8_t sys_id_doublet_running(void)
static void stop_doublet(void)
static void start_doublet(void)
void sys_id_doublet_mod_handler(uint8_t mode)
static const int8_t SYS_ID_ACTIVE_DOUBLET_AXES[]
Architecture independent timing functions.
static float get_sys_time_float(void)
Get the time in seconds since startup.
int8_t register_periodic_telemetry(struct periodic_telemetry *_pt, uint8_t _id, telemetry_cb _cb)
Register a telemetry callback function.
Periodic telemetry system header (includes downlink utility and generated code).
#define DefaultPeriodic
Set default periodic telemetry.
int int32_t
Typedef defining 32 bit int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
signed char int8_t
Typedef defining 8 bit char type.