OSDN Git Service

AFを動かす。
authorMRSa <mrsa@myad.jp>
Sat, 29 Feb 2020 07:02:28 +0000 (16:02 +0900)
committerMRSa <mrsa@myad.jp>
Sat, 29 Feb 2020 07:02:28 +0000 (16:02 +0900)
app/src/main/java/net/osdn/gokigen/a01d/camera/nikon/operation/NikonFocusingControl.java

index 43198be..0a39cf1 100644 (file)
@@ -136,7 +136,9 @@ public class NikonFocusingControl implements IFocusingControl, IPtpIpCommandCall
             int x = (0x0000ffff & (Math.round(point.x * maxPointLimitWidth) + 1));
             int y = (0x0000ffff & (Math.round(point.y * maxPointLimitHeight) + 1));
             Log.v(TAG, "Lock AF: [" + x + ","+ y + "]");
-            commandPublisher.enqueueCommand(new PtpIpCommandGeneric(this, FOCUS_LOCK, isDumpLog, 0x9205, 8, x, y));
+            commandPublisher.enqueueCommand(new PtpIpCommandGeneric(this, FOCUS_LOCK, isDumpLog, 0, 0x9205, 8, x, y));
+            commandPublisher.enqueueCommand(new PtpIpCommandGeneric(this, FOCUS_MOVE, isDumpLog, 0, 0x90c1));
+
         }
         catch (Exception e)
         {
@@ -222,10 +224,10 @@ public class NikonFocusingControl implements IFocusingControl, IPtpIpCommandCall
             else if (id == FOCUS_MOVE)
             {
                 Log.v(TAG, "FOCUS MOVED");
-                if (preFocusFrameRect != null)
-                {
-                    hideFocusFrame();
-                }
+                //if (preFocusFrameRect != null)
+                //{
+                //    hideFocusFrame();
+                //}
             }
             else // if (id == FOCUS_UNLOCK)
             {