mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-23 11:37:36 +08:00
commander: ignore REQUEST_CAMERA_INFORMATION
- add answer command logging
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user