Ejemplo n.º 1
0
/**
 * Periodic MAVLink calls.
 * Called at MAVLINK_PERIODIC_FREQ (set in module xml to 10Hz)
 */
void mavlink_periodic(void)
{
#if !defined (TELEMETRY_MAVLINK_NB_MSG)
  // use these hardcoded periods if no Mavlink process in telemetry file
  RunOnceEvery(2, mavlink_send_heartbeat(NULL, NULL));
  RunOnceEvery(5, mavlink_send_sys_status(NULL, NULL));
  RunOnceEvery(20, mavlink_send_system_time(NULL, NULL));
  RunOnceEvery(10, mavlink_send_attitude(NULL, NULL));
  RunOnceEvery(5, mavlink_send_attitude_quaternion(NULL, NULL));
  RunOnceEvery(4, mavlink_send_local_position_ned(NULL, NULL));
  RunOnceEvery(5, mavlink_send_global_position_int(NULL, NULL));
  RunOnceEvery(6, mavlink_send_gps_raw_int(NULL, NULL));
  RunOnceEvery(5, mavlink_send_rc_channels(NULL, NULL));
  RunOnceEvery(21, mavlink_send_battery_status(NULL, NULL));
  RunOnceEvery(32, mavlink_send_autopilot_version(NULL, NULL));
  RunOnceEvery(33, mavlink_send_gps_global_origin(NULL, NULL));
  RunOnceEvery(10, mavlink_send_gps_status(NULL, NULL));
  RunOnceEvery(10, mavlink_send_vfr_hud(NULL, NULL));
#endif

  // if requested, send params at 5Hz until all sent
  RunOnceEvery(2, mavlink_send_params(NULL, NULL));

  mavlink_mission_periodic();
}
Ejemplo n.º 2
0
/**
 * Periodic MAVLink calls.
 * Called at MAVLINK_PERIODIC_FREQUENCY (set in module xml to 10Hz)
 */
void mavlink_periodic(void)
{
  RunOnceEvery(2, mavlink_send_heartbeat());
  RunOnceEvery(5, mavlink_send_sys_status());
  RunOnceEvery(20, mavlink_send_system_time());
  RunOnceEvery(10, mavlink_send_attitude());
  RunOnceEvery(5, mavlink_send_attitude_quaternion());
  RunOnceEvery(5, mavlink_send_params());
  RunOnceEvery(4, mavlink_send_local_position_ned());
  RunOnceEvery(5, mavlink_send_global_position_int());
  RunOnceEvery(6, mavlink_send_gps_raw_int());
  RunOnceEvery(5, mavlink_send_attitude_quaternion());
  RunOnceEvery(5, mavlink_send_rc_channels());
  RunOnceEvery(21, mavlink_send_battery_status());
  RunOnceEvery(32, mavlink_send_autopilot_version());
  RunOnceEvery(33, mavlink_send_gps_global_origin());
  RunOnceEvery(10, mavlink_send_gps_status());
  RunOnceEvery(10, mavlink_send_vfr_hud());

  mavlink_mission_periodic();
}