OSDN Git Service

ライブビュー接続時に測光モードをスポットに設定する。
authorMRSa <mrsa@myad.jp>
Sat, 23 Sep 2017 11:17:53 +0000 (20:17 +0900)
committerMRSa <mrsa@myad.jp>
Sat, 23 Sep 2017 11:17:53 +0000 (20:17 +0900)
app/build.gradle
app/src/main/java/net/osdn/gokigen/a01d/camera/olympus/wrapper/property/IOlyCameraProperty.java
app/src/main/java/net/osdn/gokigen/a01d/liveview/LiveViewFragment.java

index 66e1933..295260f 100644 (file)
@@ -7,8 +7,8 @@ android {
         applicationId "net.osdn.gokigen.a01d"
         minSdkVersion 14
         targetSdkVersion 26
-        versionCode 10001
-        versionName "1.0.1"
+        versionCode 10002
+        versionName "1.0.2"
     }
     buildTypes {
         release {
index 9b985bf..0a38487 100644 (file)
@@ -14,6 +14,8 @@ public interface IOlyCameraProperty
     String FOCUS_STILL = "FOCUS_STILL";
     String AE_LOCK_STATE = "AE_LOCK_STATE";
 
+    String AE = "AE";
+    String AE_PINPOINT = "<AE/AE_PINPOINT>";
 
     String STILL_MF = "<FOCUS_STILL/FOCUS_MF>";
     String STILL_AF = "<FOCUS_STILL/FOCUS_SAF>";
index 9659320..9ca5644 100644 (file)
@@ -30,6 +30,8 @@ import net.osdn.gokigen.a01d.camera.olympus.wrapper.ICameraInformation;
 import net.osdn.gokigen.a01d.camera.olympus.wrapper.IFocusingModeNotify;
 import net.osdn.gokigen.a01d.camera.olympus.wrapper.ILiveViewControl;
 import net.osdn.gokigen.a01d.camera.olympus.wrapper.connection.IOlyCameraConnection;
+import net.osdn.gokigen.a01d.camera.olympus.wrapper.property.IOlyCameraProperty;
+import net.osdn.gokigen.a01d.camera.olympus.wrapper.property.IOlyCameraPropertyProvider;
 import net.osdn.gokigen.a01d.preference.IPreferencePropertyAccessor;
 
 import java.io.File;
@@ -442,6 +444,9 @@ public class LiveViewFragment extends Fragment implements IStatusViewDrawer, IFo
             // パワーズームの設定 (初期化位置の設定)
             zoomLensControl.moveInitialZoomPosition();
 
+            // 測光モードをスポットに切り替える
+            setAEtoSpot();
+
             // ライブビューの倍率設定
             updateLiveViewScale(false);
         }
@@ -451,6 +456,27 @@ public class LiveViewFragment extends Fragment implements IStatusViewDrawer, IFo
         }
     }
 
+    /**
+     *    測光モードをスポットに切り替える
+     *
+     */
+    private void setAEtoSpot()
+    {
+        try
+        {
+            IOlyCameraPropertyProvider propertyProvider = interfaceProvider.getCameraPropertyProvider();
+            if (propertyProvider != null)
+            {
+                propertyProvider.setCameraPropertyValue(IOlyCameraProperty.AE, IOlyCameraProperty.AE_PINPOINT);
+            }
+        }
+        catch (Exception e)
+        {
+            e.printStackTrace();
+        }
+    }
+
+
     @Override
     public void showFavoriteSettingDialog()
     {