Skip to main content

探照灯管理

interface ILightingManager​

描述: 探照灯管理接口,用于控制无人机挂载探照灯的开关、爆闪模式和亮度。通过 LightingManager.get() 获取实例。

包路径: com.autel.drone.sdk.vmodelx.interfaces.ILightingManager

method init​

fun init()

描述: 初始化探照灯管理器,在使用前调用

输入参数: 无

输出参数: 无

method destroy​

fun destroy()

描述: 销毁探照灯管理器,释放资源

输入参数: 无

输出参数: 无

method openLighting​

fun openLighting(device: IAutelDroneDevice, callbackWithParam: CommonCallbacks.CompletionCallbackWithParam<Void>?)

描述: 打开探照灯

输入参数:

  • device: 目标无人机设备
  • callbackWithParam: 操作结果回调,成功时返回 Void

输出参数: 无(通过 callback 返回)

method closeLighting​

fun closeLighting(device: IAutelDroneDevice, callbackWithParam: CommonCallbacks.CompletionCallbackWithParam<Void>?)

描述: 关闭探照灯

输入参数:

  • device: 目标无人机设备
  • callbackWithParam: 操作结果回调

输出参数: 无(通过 callback 返回)

method getLightingStatus​

fun getLightingStatus(device: IAutelDroneDevice, callbackWithParam: CommonCallbacks.CompletionCallbackWithParam<Int>?)

描述: 获取探照灯当前开关状态

输入参数:

  • device: 目标无人机设备
  • callbackWithParam: 结果回调,返回状态值 Int(0 关闭,1 开启)

输出参数: 无(通过 callback 返回)

method flashLighting​

fun flashLighting(device: IAutelDroneDevice, mode: Int, callbackWithParam: CommonCallbacks.CompletionCallbackWithParam<Void>?)

描述: 设置探照灯爆闪模式

输入参数:

  • device: 目标无人机设备
  • mode: 爆闪模式,0=默认(关)、1=灯光爆闪、2=警示灯爆闪
  • callbackWithParam: 操作结果回调

输出参数: 无(通过 callback 返回)

method getFlashLightingMode​

fun getFlashLightingMode(device: IAutelDroneDevice, callbackWithParam: CommonCallbacks.CompletionCallbackWithParam<Int>?)

描述: 获取当前爆闪模式

输入参数:

  • device: 目标无人机设备
  • callbackWithParam: 结果回调,返回当前爆闪模式 Int

输出参数: 无(通过 callback 返回)

method setLightingBrightness​

fun setLightingBrightness(device: IAutelDroneDevice, brightness: Int, callbackWithParam: CommonCallbacks.CompletionCallbackWithParam<Void>?)

描述: 设置探照灯亮度

输入参数:

  • device: 目标无人机设备
  • brightness: 亮度值
  • callbackWithParam: 操作结果回调

输出参数: 无(通过 callback 返回)

method getLightingBrightness​

fun getLightingBrightness(device: IAutelDroneDevice, callbackWithParam: CommonCallbacks.CompletionCallbackWithParam<Int>?)

描述: 获取当前探照灯亮度值

输入参数:

  • device: 目标无人机设备
  • callbackWithParam: 结果回调,返回亮度值 Int

输出参数: 无(通过 callback 返回)