我已成功将Osmo Mobile手持式控制器注册为委托,并且我通过委托方法收到更新硬件状态更新:
func handheldController(_ controller: DJIHandheldController, didUpdate state: DJIHandheldControllerHardwareState)
但是,录制,快门和模式按钮始终处于空闲状态。如何获取按钮事件的回调?
extension BBDJIOsmoManager: DJIHandheldControllerDelegate {
func handheldController(_ controller: DJIHandheldController, didUpdate state: DJIHandheldControllerHardwareState) {
print("did update state")
if state.modeButton == .singleClick {
print("mode clicked")
}
if state.recordAndShutterButtons == .recordClick {
print("record clicked")
}
if state.recordAndShutterButtons == .shutterClick {
print("shutter clicked")
}
if state.recordAndShutterButtons == .shutterLongClick {
print("shutter long click")
}
if state.zoomSlider == .zoomIn {
print("zoom in")
}
if state.zoomSlider == .zoomOut {
print("zoom out")
}
}
}
我看到控制台打印“ did update state”,但单击模式或记录按钮时没有任何日志。
任何帮助,我将非常感谢!