SITL: removed use of extra port for JSON

This commit is contained in:
Andrew Tridgell 2020-05-29 14:24:04 +10:00
parent c6603be64a
commit 44f727cfd2
2 changed files with 0 additions and 10 deletions

View File

@ -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
target_ip = address;
}
control_port = port_out;
sensor_port = port_in;
printf("JSON control interface set to %s:%u\n", target_ip, control_port);
}

View File

@ -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;