mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
SITL: Change Flighgear port with instance number
This commit is contained in:
parent
c4b5bd4bd9
commit
86c8145bd9
@ -98,7 +98,7 @@ void SITL_State::_sitl_setup(const char *home_str)
|
||||
}
|
||||
|
||||
if (_use_fg_view) {
|
||||
fg_socket.connect("127.0.0.1", 5503);
|
||||
fg_socket.connect("127.0.0.1", _fg_view_port);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -164,6 +164,7 @@ private:
|
||||
SITL::SITL *_sitl;
|
||||
uint16_t _rcout_port;
|
||||
uint16_t _rcin_port;
|
||||
uint16_t _fg_view_port;
|
||||
float _current;
|
||||
|
||||
bool _synthetic_clock_mode;
|
||||
|
@ -130,6 +130,7 @@ void SITL_State::_parse_command_line(int argc, char * const argv[])
|
||||
_base_port = 5760;
|
||||
_rcout_port = 5502;
|
||||
_rcin_port = 5501;
|
||||
_fg_view_port = 5503;
|
||||
_fdm_address = "127.0.0.1";
|
||||
_client_address = nullptr;
|
||||
_use_fg_view = true;
|
||||
@ -199,6 +200,7 @@ void SITL_State::_parse_command_line(int argc, char * const argv[])
|
||||
_base_port += _instance * 10;
|
||||
_rcout_port += _instance * 10;
|
||||
_rcin_port += _instance * 10;
|
||||
_fg_view_port += _instance * 10;
|
||||
}
|
||||
break;
|
||||
case 'P':
|
||||
|
Loading…
Reference in New Issue
Block a user