Mobile-SDK-Android-V5 icon indicating copy to clipboard operation
Mobile-SDK-Android-V5 copied to clipboard

Unable to adjust brightness on the spotlight (REQUEST_HANDLER_NOT_FOUND)

Open petered opened this issue 7 months ago • 2 comments

I'm on a M30T with a GL60 Mini spotlight, trying to adjust the spotlight brightness with my SDK-5 app. I've verified that the spotlight is controllable from DJI Pilot 2.

My function doing this is

    suspend fun setSpotlightPercent(percent: Int): Result<Unit> {
        val actualKey = KeyTools.createKey(PayloadKey.KeyLightCtrl)
        val message = LightCtrlMsg(
            if (percent>0) LightMode.OPEN else LightMode.CLOSE,
            LightGroup.MAIN_LED,
            percent
        )
        return setValueForKey(actualKey, message)
    }

... Where setValueForKey just wraps djiKeyManager.setValue

When I try to set it, I'm getting

.. Failed to set value for key LightCtrl to {"mode":1,"group":0,"brightness":50}: ErrorImp{errorType='CORE', errorCode='REQUEST_HANDLER_NOT_FOUND', innerCode='PAYLOAD.LightCtrl:-1', description='null', hint='error code = -1'}: Details: null

Any idea what I might be missing here?

petered avatar Mar 10 '25 21:03 petered