static inline void main_init(void) { hw_init(); sys_time_init(); imu_init(); baro_init(); radio_control_init(); actuators_init(); overo_link_init(); cscp_init(); adc_init(); #ifdef PASSTHROUGH_CYGNUS autopilot_init(); nav_init(); guidance_h_init(); guidance_v_init(); stabilization_init(); ahrs_aligner_init(); ahrs_init(); ins_init(); #endif adc_buf_channel(0, &adc0_buf, 8); adc_buf_channel(1, &adc1_buf, 8); adc_buf_channel(2, &adc2_buf, 8); adc_buf_channel(3, &adc3_buf, 8); cscp_register_callback(CSC_VANE_MSG_ID, on_vane_msg, (void *)&csc_vane_msg); new_radio_msg = FALSE; new_baro_diff = FALSE; new_baro_abs = FALSE; new_vane = FALSE; new_adc = FALSE; overo_link.up.msg.imu_tick = 0; }
static inline void main_init( void ) { hw_init(); sys_time_init(); cscp_init(); cscp_register_callback(CSC_VANE_MSG_ID, main_on_vane_msg, (void *)&csc_vane_msg); }
static inline void main_init( void ) { hw_init(); sys_time_register_timer((1./PERIODIC_FREQUENCY), NULL); cscp_init(); cscp_register_callback(CSC_VANE_MSG_ID, main_on_vane_msg, (void *)&csc_vane_msg); }