Mavic air2 全景拍照
0
有哪位知道在air2上如和用sdk拍全景照片。我用下面的代码,能将摄像头成功设置成全景模式,但是调用拍照的函数,没有反应,请帮看一下哪里有问题,谢谢
private fun shootPanoramaMode(mode: SettingsDefinitions.PhotoPanoramaMode){
val camera: Camera? = cameraInstance
if( getDroneModel() == MAVIC_AIR2 ){
camera?.setFlatMode(SettingsDefinitions.FlatCameraMode.PHOTO_PANORAMA) {
if (it == null) {
camera.setPhotoPanoramaMode(mode){
if(it == null){
startShootPhoto()
}else{
showShortToast(it.toString())
}
}
} else {
showShortToast(it.toString())
}
} }
}
private fun startShootPhoto(){
handler.postDelayed({
cameraInstance?.startShootPhoto {
if (it == null) {
showShortToast("take photo: success.")
} else {
showShortToast(it.toString())
}
}
}, 2000)
}
|
|
|
|