C_RESULT ardrone_tool_shutdown()
{
  C_RESULT res = C_OK;
  
#ifndef NO_ARDRONE_MAINLOOP
  res = ardrone_tool_shutdown_custom();
#endif

  // Shutdown subsystems
  ardrone_navdata_client_shutdown();
  ardrone_control_shutdown();
  ardrone_tool_input_shutdown();
 
  JOIN_THREAD(ardrone_control); 
  JOIN_THREAD(navdata_update);

  // Shutdown AT Commands
  ATcodec_exit_thread();
  ATcodec_Shutdown_Library();

  vp_com_disconnect(COM_NAVDATA());
  vp_com_shutdown(COM_NAVDATA());

  PRINT("Custom ardrone tool ended\n");

  return res;
}
示例#2
0
C_RESULT ardrone_tool_shutdown()
{
  C_RESULT res = C_OK;
  
  res = ardrone_tool_shutdown_custom();

  // Shutdown subsystems
  ardrone_navdata_client_shutdown();
  ardrone_control_shutdown();
  ardrone_tool_input_shutdown();
 
  JOIN_THREAD(ardrone_control); 
  JOIN_THREAD(navdata_update);

  fflush (NULL);

  // Shutdown AT Commands
  ATcodec_exit_thread();
  ATcodec_Shutdown_Library();

  vp_com_disconnect(COM_NAVDATA());
  vp_com_shutdown(COM_NAVDATA());

  academy_download_shutdown();
  academy_shutdown();

  PRINT("Custom ardrone tool ended\n");

  return res;
}
/**
 * @param void
 *
 * @brief 
 *
 * @DESCRIPTION
 *
 *******************************************************************/
void ardrone_at_shutdown ( void )
{
	if ( !at_init )
		return;

	ATcodec_Shutdown_Library();
	vp_os_mutex_destroy(&at_mutex);

	at_init = 0;
}