Exemplo n.º 1
0
static inline void autopilot_main_init( void ) {
  hw_init();
  sys_time_init();
  led_init();

  supervision_init();
  actuators_init(ACTUATOR_BANK_MOTORS);

#if BOMB_ENABLED
  bomb_init_servo(RADIO_FMS, 0, 0);
#endif

  rc_init();

#if HARDWARE_ENABLED_GPS
  gps_init();
#else
  comm_init(COMM_0);
  comm_add_tx_callback(COMM_0, comm_autopilot_message_send);
  comm_add_rx_callback(COMM_0, comm_autopilot_message_received);
#endif

  comm_init(COMM_TELEMETRY);
  comm_add_tx_callback(COMM_TELEMETRY, comm_autopilot_message_send);
  comm_add_rx_callback(COMM_TELEMETRY, comm_autopilot_message_received);

  analog_init();
  analog_enable_channel(ANALOG_CHANNEL_BATTERY);
  analog_enable_channel(ANALOG_CHANNEL_PRESSURE);

  altimeter_init();

  imu_init();

  autopilot_init();

  ahrs_init();
  ins_init();

  fms_init();

  int_enable();
}
Exemplo n.º 2
0
static inline void main_init( void ) {
    hw_init();
    sys_time_init();
    led_init();

    comm_init(DA_COMM);
    comm_add_tx_callback(DA_COMM, test_message_tx);
    comm_add_rx_callback(DA_COMM, test_message_rx);

    int_enable();
}
Exemplo n.º 3
0
static inline void main_init( void ) {
    hw_init();
    sys_time_init();
    led_init();

    comm_init(COMM_TELEMETRY);
    /* add rx callback so we can send ALTIMETER_RESET messages */
    comm_add_rx_callback(COMM_TELEMETRY, comm_autopilot_message_received);

    analog_init();
    analog_enable_channel(ANALOG_CHANNEL_PRESSURE);

    altimeter_init();

    int_enable();
}