OSDN Git Service

SONYのタッチAFが効かない場合は、シャッター半押しアクションに切り替えて動かすようにした。
authorMRSa <mrsa@myad.jp>
Wed, 18 Aug 2021 14:38:43 +0000 (23:38 +0900)
committerMRSa <mrsa@myad.jp>
Wed, 18 Aug 2021 14:38:43 +0000 (23:38 +0900)
.idea/deploymentTargetDropDown.xml [deleted file]
app/src/main/java/jp/osdn/gokigen/gokigenassets/camera/sony/operation/takepicture/AutoFocusControl.kt

diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml
deleted file mode 100644 (file)
index 842d221..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="deploymentTargetDropDown">
-    <runningDeviceTargetSelectedWithDropDown>
-      <Target>
-        <type value="RUNNING_DEVICE_TARGET" />
-        <deviceKey>
-          <Key>
-            <type value="SERIAL_NUMBER" />
-            <value value="3e50111c1220" />
-          </Key>
-        </deviceKey>
-      </Target>
-    </runningDeviceTargetSelectedWithDropDown>
-    <timeTargetWasSelectedWithDropDown value="2021-08-16T13:24:27.005390Z" />
-  </component>
-</project>
\ No newline at end of file
index 6954183..df2ae26 100644 (file)
@@ -39,6 +39,7 @@ class AutoFocusControl(private val frameDisplayer: IAutoFocusFrameDisplay, priva
                     val resultsObj = cameraApi.setTouchAFPosition(posX, posY)
                     if (resultsObj != null)
                     {
+                        //Log.v(TAG, " lockAutoFocus() LEN:${resultsObj.length()}  $resultsObj")
                         if (findTouchAFPositionResult(resultsObj))
                         {
                             // AF FOCUSED
@@ -195,7 +196,11 @@ class AutoFocusControl(private val frameDisplayer: IAutoFocusFrameDisplay, priva
         }
         catch (e: Exception)
         {
-            e.printStackTrace()
+            //e.printStackTrace()
+
+            // resultがない... halfPressShutterで対応する
+            Log.v(TAG, " Touch-AF is fail. try halfPressShutter action.")
+            halfPressShutter(true)
         }
         return afResult
     }