OSDK 4.1 Gimbal rotate sync -> strange rattling noise on H20T but not on Z30
CompletedHello,
I'm using a C++ program to control the gimbal. When the Z30 is connected, the movement is smooth without any strange sound. When the H20T is connected, the movement has a rattling sound which doesn't sound good.
Does this moise come from the duration which I typically set to 0s? How to get rid of this rattling sound?
Below you'll find the C++ code of the function.
BR,
Michael
int moveGimbal(GimbalManagerSync *gimbal, string payload_index, int yaw, int roll, int pitch, int mode, int duration, string cam_type, int num_payload, int loggingAvailable)
{
ErrorCode::ErrorCodeType ret;
DJI::OSDK::GimbalModule::Rotation rotation;
float factor_step = 0.1;
rotation.rotationMode = mode;
rotation.pitch = static_cast<float>(pitch)*factor_step;
rotation.roll = static_cast<float>(roll)*factor_step;
rotation.yaw = static_cast<float>(yaw)*factor_step;
rotation.time = duration;
try
{
if (payload_index == "PAYLOAD_INDEX_0")
ret = gimbal->rotateSync(PAYLOAD_INDEX_0, rotation);
else if (payload_index == "PAYLOAD_INDEX_1")
ret = gimbal->rotateSync(PAYLOAD_INDEX_1, rotation);
else if (payload_index == "PAYLOAD_INDEX_2")
ret = gimbal->rotateSync(PAYLOAD_INDEX_2, rotation);
}
catch (...)
{
DERROR("MOVE GIMBAL failed.");
return 0;
}
if (ret != ErrorCode::SysCommonErr::Success)
{
DERROR("MOVE GIMBAL failed.");
ErrorCode::printErrorCodeMsg(ret);
return 0;
}
return 1;
}
Please sign in to leave a comment.
Comments
2 comments