Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

Commit

Permalink
Remove unneeded remote addr
Browse files Browse the repository at this point in the history
The remote address of mavproxy will be filled the first time an update
is received from mavproxy, so the initialization will be overwritten.
There is no data to be sent from the client before an initial message
arrives from mavproxy, so there is no need to initialize the address.
  • Loading branch information
Rodrigo Chiossi authored and guiccbr committed Jun 27, 2016
1 parent 1b253b8 commit eca6bd3
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ once with:
2. In a third terminal, run Mavproxy:

```
mavproxy.py --master tcp:127.0.0.1:5760 --out udp:127.0.0.1:14550 --out udp:127.0.0.1:14556 --streamrate -1
mavproxy.py --master tcp:127.0.0.1:5760 --out udp:127.0.0.1:14556 --streamrate -1
```

Load the Parameters on Mavproxy Prompt:
Expand Down
2 changes: 0 additions & 2 deletions gzsitl/defines.hh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
#define GZSITL_TARGET_MODEL_NAME "gzsitl_target"
#define DEBUG_STATE (true)
#define DEBUG_MAVLINK (false)
#define MAVPROXY_IP "127.0.0.1"
#define MAVPROXY_PORT (14556)
#define LOCAL_PORT (14550)
#define DEFAULT_TARGET_SYSTEM_ID (1) // Default Copter system ID
#define DEFAULT_TARGET_COMPONENT_ID (1) // Default Copter component ID
#define DEFAULT_SYSTEM_ID (22) // This system ID
Expand Down
4 changes: 0 additions & 4 deletions gzsitl/mavserver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ MavServer::MavServer(short port)
close(sock);
exit(EXIT_FAILURE);
}

remote_addr.sin_family = AF_INET;
remote_addr.sin_addr.s_addr = inet_addr(MAVPROXY_IP);
remote_addr.sin_port = htons(LOCAL_PORT);
}

MavServer::~MavServer()
Expand Down

0 comments on commit eca6bd3

Please sign in to comment.