commander: put unsupported warning back in place

This commit is contained in:
Julian Oes 2014-04-07 21:42:19 +02:00
parent a66dcbf7e9
commit 3dd64086e4
1 changed files with 6 additions and 6 deletions

View File

@ -587,15 +587,15 @@ bool handle_command(struct vehicle_status_s *status, const struct safety_s *safe
break;
default:
/* warn about unsupported commands */
/* Warn about unsupported commands, this makes sense because only commands
* to this component ID (or all) are passed by mavlink. */
answer_command(*cmd, VEHICLE_CMD_RESULT_UNSUPPORTED);
break;
}
/* silently ignore unsupported commands, maybe they are passed on over mavlink */
// if (result != VEHICLE_CMD_RESULT_UNSUPPORTED) {
// /* already warned about unsupported commands in "default" case */
// answer_command(*cmd, result);
// }
if (result != VEHICLE_CMD_RESULT_UNSUPPORTED) {
/* already warned about unsupported commands in "default" case */
answer_command(*cmd, result);
}
/* send any requested ACKs */
if (cmd->confirmation > 0 && result != VEHICLE_CMD_RESULT_UNSUPPORTED) {