Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gimbal mode #1283

Open
huongta157 opened this issue Apr 8, 2024 · 9 comments
Open

Gimbal mode #1283

huongta157 opened this issue Apr 8, 2024 · 9 comments

Comments

@huongta157
Copy link

huongta157 commented Apr 8, 2024

val gimbal = DJISDKManager.getInstance().product?.gimbal
// Check if Gimbal is available
if (gimbal != null) {
    val gimbalMode = GimbalMode.FPV // Set the desired gimbal mode
    // Set the mode of the gimbal
    gimbal.setMode(gimbalMode){}
}

I used the above code to implement update gimbal mode.
But how to check the current gimbal mode for the next time open the application?

@dji-dev
Copy link
Contributor

dji-dev commented Apr 9, 2024

Agent comment from yating.liao in Zendesk ticket #104489:

The setStateCallback can be used to set up a status listener for the gimbal. The listener will continuously push updates on the gimbal status, which includes the gimbal mode.
https://developer.dji.com/api-reference/android-api/Components/Gimbal/DJIGimbal_GimbalState.html#djigimbal_gimbalstate_workmode_inline

°°°

@huongta157
Copy link
Author

I got error when set gimbal mode: Execution of this process has timed out

@dji-dev
Copy link
Contributor

dji-dev commented Apr 10, 2024

Agent comment from yating.liao in Zendesk ticket #104489:

Could this error occur consistently? Under what circumstances does this error typically occur?

°°°

@huongta157
Copy link
Author

Screenshot 2024-04-26 at 11 46 10
This is the code I implemented this feature, please help me check it.

@dji-dev
Copy link
Contributor

dji-dev commented Apr 26, 2024

Agent comment from yating.liao in Zendesk ticket #104489:

The code is not error, but the gimbal mode may vary for different aircraft.

°°°

@huongta157
Copy link
Author

How to check the gimbal mode for each aircraft?
My drone is: Air 2s

@dji-lyt
Copy link

dji-lyt commented Apr 29, 2024

Most aircraft support FPV and Yaw_Follow modes, with enterprise series drones also offering Free mode as an additional feature.The DJI Air 2s you are using supports FPV and Yaw_Follow modes.
Do you encounter the same issue with your aircraft in the sample code as well?
image

@huongta157
Copy link
Author

@dji-lyt I run the sample code, but still show error message is: Execution of this process has timed out

@dji-dev
Copy link
Contributor

dji-dev commented May 13, 2024

Agent comment from yating.liao in Zendesk ticket #104489:

When you set the gimbal mode to YAW_FOLLOW, what is the current gimbal mode being used by the camera? Can you retrieve it using getMode? If the camera's current mode is YAW_FOLLOW, will setting it to FPV also result in the same error?

Could you please inform us of the MSDK version you are using?

°°°

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants