mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-19 19:19:06 +08:00
simulator: fix after px4_task_spawn_cmd change
argv[0] now contains the task name, so everything moves by one.
This commit is contained in:
parent
dba3c642d2
commit
1719ff9892
@ -69,14 +69,14 @@ int Simulator::start(int argc, char *argv[])
|
||||
_instance = new Simulator();
|
||||
|
||||
if (_instance) {
|
||||
if (argc == 4 && strcmp(argv[2], "-u") == 0) {
|
||||
if (argc == 5 && strcmp(argv[3], "-u") == 0) {
|
||||
_instance->set_ip(InternetProtocol::UDP);
|
||||
_instance->set_port(atoi(argv[3]));
|
||||
_instance->set_port(atoi(argv[4]));
|
||||
}
|
||||
|
||||
if (argc == 4 && strcmp(argv[2], "-c") == 0) {
|
||||
if (argc == 5 && strcmp(argv[3], "-c") == 0) {
|
||||
_instance->set_ip(InternetProtocol::TCP);
|
||||
_instance->set_port(atoi(argv[3]));
|
||||
_instance->set_port(atoi(argv[4]));
|
||||
}
|
||||
|
||||
_instance->run();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user