OSDN Git Service

SONYの露出補正値設定を適切できるように修正する。
authorMRSa <mrsa@myad.jp>
Mon, 16 Aug 2021 12:55:18 +0000 (21:55 +0900)
committerMRSa <mrsa@myad.jp>
Mon, 16 Aug 2021 12:55:18 +0000 (21:55 +0900)
.idea/deploymentTargetDropDown.xml [deleted file]
app/src/main/java/jp/osdn/gokigen/gokigenassets/camera/sony/wrapper/eventlistener/SonyStatusCandidates.kt

diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml
deleted file mode 100644 (file)
index 7c41915..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="AHG771417877" />
-          </Key>
-        </deviceKey>
-      </Target>
-    </runningDeviceTargetSelectedWithDropDown>
-    <timeTargetWasSelectedWithDropDown value="2021-08-09T13:02:31.530233800Z" />
-  </component>
-</project>
\ No newline at end of file
index 1045f33..7a18bd1 100644 (file)
@@ -3,6 +3,7 @@ package jp.osdn.gokigen.gokigenassets.camera.sony.wrapper.eventlistener
 import android.util.Log
 import jp.osdn.gokigen.gokigenassets.camera.sony.wrapper.ISonyCameraApi
 import org.json.JSONArray
+import kotlin.math.abs
 
 class SonyStatusCandidates()
 {
@@ -298,7 +299,7 @@ class SonyStatusCandidates()
             for (index in expRevLowerIndex..expRevUpperIndex)
             {
                 val checkValue = index.toDouble() / step
-                if ((doubleValue - checkValue) <= 0.0f)
+                if (abs(doubleValue - checkValue) <= 0.1f)
                 {
                     Log.v(TAG, " ----- SET exposureCompensation : $doubleValue (index:$index)")
                     val replyJson = cameraApi.callGenericSonyApiMethod("camera", "setExposureCompensation", JSONArray().put(index), "1.0")