Disable UDP options on platforms where it's not supported

This commit is contained in:
Kevin Mehall
2016-03-17 18:50:01 -07:00
committed by Lorenz Meier
parent 0cc3b4becc
commit afa06ba9d7

View File

@@ -1543,6 +1543,7 @@ Mavlink::task_main(int argc, char *argv[])
set_protocol(SERIAL); set_protocol(SERIAL);
break; break;
#ifdef __PX4_POSIX
case 'u': case 'u':
temp_int_arg = strtoul(myoptarg, &eptr, 10); temp_int_arg = strtoul(myoptarg, &eptr, 10);
if ( *eptr == '\0' ) { if ( *eptr == '\0' ) {
@@ -1575,6 +1576,14 @@ Mavlink::task_main(int argc, char *argv[])
err_flag = true; err_flag = true;
} }
break; break;
#else
case 'u':
case 'o':
case 't':
warnx("UDP options not supported on this platform");
err_flag = true;
break;
#endif
// case 'e': // case 'e':
// mavlink_link_termination_allowed = true; // mavlink_link_termination_allowed = true;