Chapter 12: Gimbal

Follow

Comments

2 comments

  • Nam Hoang

    I have a button which is used to rotate gimbal with angle rotate is 180 degrees. What should I do to code it? Thank you 

    0
    Comment actions Permalink
  • Peter O'Connor

    When I use KeyGimbalAttitude, the Yaw is -75 degrees off.  When I point the drone (Mini3 Pro) exactly north (0 degrees - based on the display in the Default Layout app), the KeyGimbalAttitude message is giving me -75.20 degrees.  

    What's wrong here?  Why the offset?

    Edit: Solved - just had to recalibrate the gimbal.. example code:

    fun recalibrateGimbal() {
        djiKeyManager.performAction(KeyTools.createKey(co_w.KeyGimbalCalibrate), object : CompletionCallbackWithParam<EmptyMsg> {
            override fun onSuccess(result: EmptyMsg) {
                println("Gimbal yaw recalibration started")
            }

            override fun onFailure(error: IDJIError) {
                println("Gimbal yaw recalibration failed: ${error.description()}")
            }
        })
    }
    0
    Comment actions Permalink

Please sign in to leave a comment.

close