This is a major change.
1) SDK main function reverted to default 2) Now using SDK blocking main function 3) ROS update now executes in its own thread 4) Signal handling added for proper shutdown 5) Some bug fixes
Esse commit está contido em:
@@ -306,7 +306,6 @@ void ardrone_at_set_flat_trim(void)
|
||||
{
|
||||
if (!at_init)
|
||||
return;
|
||||
|
||||
vp_os_mutex_lock(&at_mutex);
|
||||
ATcodec_Queue_Message_valist( ids.AT_MSG_ATCMD_FTRIM_EXE,
|
||||
++nb_sequence );
|
||||
|
||||
@@ -297,7 +297,7 @@ C_RESULT ardrone_tool_shutdown()
|
||||
}
|
||||
|
||||
#include <locale.h>
|
||||
int ardrone_tool_main(int argc, char **argv, int run_loop)
|
||||
int ardrone_tool_main(int argc, char **argv)
|
||||
{
|
||||
C_RESULT res;
|
||||
const char* old_locale;
|
||||
@@ -404,15 +404,11 @@ int ardrone_tool_main(int argc, char **argv, int run_loop)
|
||||
appname = &argv[0][lastSlashPos+1];
|
||||
ardrone_gen_appid (appname, __SDK_VERSION__, app_id, app_name, sizeof (app_name));
|
||||
res = ardrone_tool_init(wifi_ardrone_ip, strlen(wifi_ardrone_ip), NULL, appname, NULL, NULL, NULL, MAX_FLIGHT_STORING_SIZE, NULL);
|
||||
if (run_loop == 1)
|
||||
{
|
||||
while( SUCCEED(res) && ardrone_tool_exit() == FALSE )
|
||||
{
|
||||
res = ardrone_tool_update();
|
||||
}
|
||||
|
||||
res = ardrone_tool_shutdown();
|
||||
}
|
||||
while( SUCCEED(res) && ardrone_tool_exit() == FALSE )
|
||||
{
|
||||
res = ardrone_tool_update();
|
||||
}
|
||||
res = ardrone_tool_shutdown();
|
||||
}
|
||||
|
||||
if( old_locale != NULL )
|
||||
|
||||
@@ -52,7 +52,7 @@ extern void ardrone_tool_display_cmd_line_custom( void ) WEAK;
|
||||
extern bool_t ardrone_tool_parse_cmd_line_custom( const char* cmd ) WEAK;
|
||||
|
||||
// This is implemented by the library
|
||||
int ardrone_tool_main(int argc, char**argv, int run_loop);
|
||||
int ardrone_tool_main(int argc, char**argv);
|
||||
C_RESULT ardrone_tool_init(const char* ardrone_ip, size_t n,
|
||||
AT_CODEC_FUNCTIONS_PTRS *ptrs, const char *appname,
|
||||
const char *usrname, const char *rootdir, const char *flightdir,
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário