mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-23 00:04:02 -04:00
SITL: removed use of extra port for JSON
This commit is contained in:
parent
c6603be64a
commit
44f727cfd2
@ -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)
|
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.set_blocking(false);
|
||||||
sock.reuseaddress();
|
sock.reuseaddress();
|
||||||
|
|
||||||
@ -95,7 +89,6 @@ void JSON::set_interface_ports(const char* address, const int port_in, const int
|
|||||||
target_ip = address;
|
target_ip = address;
|
||||||
}
|
}
|
||||||
control_port = port_out;
|
control_port = port_out;
|
||||||
sensor_port = port_in;
|
|
||||||
|
|
||||||
printf("JSON control interface set to %s:%u\n", target_ip, control_port);
|
printf("JSON control interface set to %s:%u\n", target_ip, control_port);
|
||||||
}
|
}
|
||||||
|
@ -45,9 +45,6 @@ private:
|
|||||||
// default connection_info_.ip_address
|
// default connection_info_.ip_address
|
||||||
const char *target_ip = "127.0.0.1";
|
const char *target_ip = "127.0.0.1";
|
||||||
|
|
||||||
// default connection_info_.ip_port
|
|
||||||
uint16_t sensor_port = 9003;
|
|
||||||
|
|
||||||
// default connection_info_.sitl_ip_port
|
// default connection_info_.sitl_ip_port
|
||||||
uint16_t control_port = 9002;
|
uint16_t control_port = 9002;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user