|
|
|
@ -1209,15 +1209,47 @@ void UAS::setManual6DOFControlCommands(double x, double y, double z, double roll
@@ -1209,15 +1209,47 @@ void UAS::setManual6DOFControlCommands(double x, double y, double z, double roll
|
|
|
|
|
*/ |
|
|
|
|
void UAS::pairRX(int rxType, int rxSubType) |
|
|
|
|
{ |
|
|
|
|
if (!_vehicle) { |
|
|
|
|
return; |
|
|
|
|
if (_vehicle) { |
|
|
|
|
_vehicle->sendMavCommand(_vehicle->defaultComponentId(), // target component
|
|
|
|
|
MAV_CMD_START_RX_PAIR, // command id
|
|
|
|
|
true, // showError
|
|
|
|
|
rxType, |
|
|
|
|
rxSubType); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
_vehicle->sendMavCommand(_vehicle->defaultComponentId(), // target component
|
|
|
|
|
MAV_CMD_START_RX_PAIR, // command id
|
|
|
|
|
true, // showError
|
|
|
|
|
rxType, |
|
|
|
|
rxSubType); |
|
|
|
|
/**
|
|
|
|
|
* Order the robot to take a picture (Testing -- Incomplete API) |
|
|
|
|
*/ |
|
|
|
|
void UAS::takePhoto() |
|
|
|
|
{ |
|
|
|
|
if (_vehicle) { |
|
|
|
|
_vehicle->sendMavCommand(_vehicle->defaultComponentId(), // target component
|
|
|
|
|
MAV_CMD_IMAGE_START_CAPTURE, // command id
|
|
|
|
|
true, // showError
|
|
|
|
|
0, // Duration between two consecutive pictures (in seconds)
|
|
|
|
|
1, // Number of images to capture total - 0 for unlimited capture
|
|
|
|
|
0, // Resolution in megapixels (0.3 for 640x480, 1.3 for 1280x720, etc), set to 0 if param 4/5 are used
|
|
|
|
|
1920, // Resolution horizontal in pixels
|
|
|
|
|
1080); // Resolution horizontal in pixels
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Order the robot to toggle video recording (Testing -- Incomplete API) |
|
|
|
|
*/ |
|
|
|
|
void UAS::toggleVideo() |
|
|
|
|
{ |
|
|
|
|
if (_vehicle) { |
|
|
|
|
_vehicle->sendMavCommand(_vehicle->defaultComponentId(), // target component
|
|
|
|
|
MAV_CMD_VIDEO_START_CAPTURE, // command id
|
|
|
|
|
true, // showError
|
|
|
|
|
0, // Camera ID (0 for all cameras), 1 for first, 2 for second, etc.
|
|
|
|
|
60, // Frames per second
|
|
|
|
|
0, // Resolution in megapixels (0.3 for 640x480, 1.3 for 1280x720, etc), set to 0 if param 4/5 are used
|
|
|
|
|
1920, // Resolution horizontal in pixels
|
|
|
|
|
1080); // Resolution horizontal in pixels
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|