diff --git a/msg/VehicleCommand.msg b/msg/VehicleCommand.msg index b147bef09208..5606883623fa 100644 --- a/msg/VehicleCommand.msg +++ b/msg/VehicleCommand.msg @@ -82,6 +82,7 @@ uint16 VEHICLE_CMD_RUN_PREARM_CHECKS = 401 # Instructs a target system to uint16 VEHICLE_CMD_INJECT_FAILURE = 420 # Inject artificial failure for testing purposes uint16 VEHICLE_CMD_START_RX_PAIR = 500 # Starts receiver pairing |0:Spektrum| 0:Spektrum DSM2, 1:Spektrum DSMX| uint16 VEHICLE_CMD_REQUEST_MESSAGE = 512 # Request to send a single instance of the specified message +uint16 VEHICLE_CMD_REQUEST_CAMERA_INFORMATION = 521 # Request camera information (CAMERA_INFORMATION). |0: No action 1: Request camera capabilities| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| uint16 VEHICLE_CMD_SET_CAMERA_MODE = 530 # Set camera capture mode (photo, video, etc.) uint16 VEHICLE_CMD_SET_CAMERA_ZOOM = 531 # Set camera zoom uint16 VEHICLE_CMD_SET_CAMERA_FOCUS = 532 diff --git a/src/modules/commander/Commander.cpp b/src/modules/commander/Commander.cpp index 8e9f834c365c..67e314ce7231 100644 --- a/src/modules/commander/Commander.cpp +++ b/src/modules/commander/Commander.cpp @@ -1499,6 +1499,8 @@ Commander::handle_command(const vehicle_command_s &cmd) case vehicle_command_s::VEHICLE_CMD_REQUEST_MESSAGE: case vehicle_command_s::VEHICLE_CMD_DO_WINCH: case vehicle_command_s::VEHICLE_CMD_DO_GRIPPER: + case vehicle_command_s::VEHICLE_CMD_EXTERNAL_POSITION_ESTIMATE: + case vehicle_command_s::VEHICLE_CMD_REQUEST_CAMERA_INFORMATION: /* ignore commands that are handled by other parts of the system */ break; @@ -2601,23 +2603,28 @@ void Commander::answer_command(const vehicle_command_s &cmd, uint8_t result) break; case vehicle_command_ack_s::VEHICLE_CMD_RESULT_DENIED: + PX4_DEBUG("command %" PRIu32 " denied", cmd.command); tune_negative(true); break; case vehicle_command_ack_s::VEHICLE_CMD_RESULT_FAILED: + PX4_DEBUG("command %" PRIu32 " failed", cmd.command); tune_negative(true); break; case vehicle_command_ack_s::VEHICLE_CMD_RESULT_TEMPORARILY_REJECTED: + PX4_DEBUG("command %" PRIu32 " temporarily rejected", cmd.command); tune_negative(true); break; case vehicle_command_ack_s::VEHICLE_CMD_RESULT_UNSUPPORTED: + PX4_WARN("command %" PRIu32 " unsupported", cmd.command); tune_negative(true); break; default: - break; + PX4_ERR("command %" PRIu32 " invalid result %d", cmd.command, result); + return; } /* publish ACK */