Skip to content

Commit

Permalink
Minimal changes to make multiple ardrone_autonomy instances run on th…
Browse files Browse the repository at this point in the history
…e same computer
  • Loading branch information
Kenneth Bogert committed Mar 25, 2014
1 parent f7f28d0 commit 2ff57fa
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions ardrone_lib.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,52 @@ index 0b96558..0c101a0 100644
$(SILENT_MAKE)echo "Done"
endif
endif
diff --git a/ARDroneLib/Soft/Lib/ardrone_tool/AT/ardrone_at_mutex.c b/ARDroneLib/Soft/Lib/ardrone_tool/AT/ardrone_at_mutex.c
index 67bfdfc..f96c262 100644
--- a/ARDroneLib/Soft/Lib/ardrone_tool/AT/ardrone_at_mutex.c
+++ b/ARDroneLib/Soft/Lib/ardrone_tool/AT/ardrone_at_mutex.c
@@ -138,8 +138,9 @@ AT_CODEC_ERROR_CODE host_open( void )

if( !init_ok )
{
- COM_CONFIG_SOCKET_AT(&at_socket, VP_COM_CLIENT, AT_PORT, wifi_ardrone_ip);
+ COM_CONFIG_SOCKET_AT(&at_socket, VP_COM_CLIENT, 0, wifi_ardrone_ip);
at_socket.protocol = VP_COM_UDP;
+ at_socket.remotePort = AT_PORT;

if(VP_FAILED(vp_com_init(COM_AT())))
{
diff --git a/ARDroneLib/Soft/Lib/ardrone_tool/Navdata/ardrone_navdata_client.c b/ARDroneLib/Soft/Lib/ardrone_tool/Navdata/ardrone_navdata_client.c
index fb35ded..278a72f 100644
--- a/ARDroneLib/Soft/Lib/ardrone_tool/Navdata/ardrone_navdata_client.c
+++ b/ARDroneLib/Soft/Lib/ardrone_tool/Navdata/ardrone_navdata_client.c
@@ -36,10 +36,11 @@ C_RESULT ardrone_navdata_client_init(void)
{
C_RESULT res;

- COM_CONFIG_SOCKET_NAVDATA(&navdata_socket, VP_COM_CLIENT, NAVDATA_PORT, wifi_ardrone_ip);
+ COM_CONFIG_SOCKET_NAVDATA(&navdata_socket, VP_COM_CLIENT, 0, wifi_ardrone_ip);
navdata_socket.protocol = VP_COM_UDP;
navdata_socket.is_multicast = 0; // disable multicast for Navdata
navdata_socket.multicast_base_addr = MULTICAST_BASE_ADDR;
+ navdata_socket.remotePort = NAVDATA_PORT;

vp_os_mutex_init(&navdata_client_mutex);
vp_os_cond_init(&navdata_client_condition, &navdata_client_mutex);
diff --git a/ARDroneLib/Soft/Lib/ardrone_tool/Video/video_stage.c b/ARDroneLib/Soft/Lib/ardrone_tool/Video/video_stage.c
index 967808a..2368028 100644
--- a/ARDroneLib/Soft/Lib/ardrone_tool/Video/video_stage.c
+++ b/ARDroneLib/Soft/Lib/ardrone_tool/Video/video_stage.c
@@ -96,7 +96,8 @@ DEFINE_THREAD_ROUTINE(video_stage, data) {
icc_udp.com = COM_VIDEO();
icc_udp.buffer_size = (1024*1024);
icc_udp.protocol = VP_COM_UDP;
- COM_CONFIG_SOCKET_VIDEO(&icc_udp.socket, VP_COM_CLIENT, VIDEO_PORT, wifi_ardrone_ip);
+ COM_CONFIG_SOCKET_VIDEO(&icc_udp.socket, VP_COM_CLIENT, 0, wifi_ardrone_ip);
+ icc_udp.socket.remotePort = VIDEO_PORT;

icc.nb_sockets = 2;
icc.configs = icc_tab;
diff --git a/ARDroneLib/Soft/Lib/ardrone_tool/ardrone_tool.c b/ARDroneLib/Soft/Lib/ardrone_tool/ardrone_tool.c
index 8466d4c..0b4f2e7 100644
--- a/ARDroneLib/Soft/Lib/ardrone_tool/ardrone_tool.c
Expand Down

0 comments on commit 2ff57fa

Please sign in to comment.