Browse Source

SITL: removed use of extra port for JSON

c415-sdk
Andrew Tridgell 5 years ago
parent
commit
44f727cfd2
  1. 7
      libraries/SITL/SIM_JSON.cpp
  2. 3
      libraries/SITL/SIM_JSON.h

7
libraries/SITL/SIM_JSON.cpp

@ -82,12 +82,6 @@ JSON::JSON(const char *frame_str) : @@ -82,12 +82,6 @@ JSON::JSON(const char *frame_str) :
*/
void JSON::set_interface_ports(const char* address, const int port_in, const int port_out)
{
if (!sock.bind("0.0.0.0", port_in)) {
printf("Unable to bind JSON sensor_in socket at port %u - Error: %s\n",
port_in, strerror(errno));
return;
}
printf("Bind SITL sensor input at %s:%u\n", "127.0.0.1", port_in);
sock.set_blocking(false);
sock.reuseaddress();
@ -95,7 +89,6 @@ void JSON::set_interface_ports(const char* address, const int port_in, const int @@ -95,7 +89,6 @@ void JSON::set_interface_ports(const char* address, const int port_in, const int
target_ip = address;
}
control_port = port_out;
sensor_port = port_in;
printf("JSON control interface set to %s:%u\n", target_ip, control_port);
}

3
libraries/SITL/SIM_JSON.h

@ -45,9 +45,6 @@ private: @@ -45,9 +45,6 @@ private:
// default connection_info_.ip_address
const char *target_ip = "127.0.0.1";
// default connection_info_.ip_port
uint16_t sensor_port = 9003;
// default connection_info_.sitl_ip_port
uint16_t control_port = 9002;

Loading…
Cancel
Save