OSDN Git Service

NikonのLV、すこし改善。
authorMRSa <mrsa@myad.jp>
Wed, 21 Oct 2020 14:38:26 +0000 (23:38 +0900)
committerMRSa <mrsa@myad.jp>
Wed, 21 Oct 2020 14:38:26 +0000 (23:38 +0900)
app/src/main/java/net/osdn/gokigen/a01d/camera/nikon/wrapper/NikonInterfaceProvider.java
app/src/main/java/net/osdn/gokigen/a01d/camera/nikon/wrapper/command/messages/specific/NikonLiveViewRequestMessage.java
app/src/main/java/net/osdn/gokigen/a01d/camera/ptpip/wrapper/command/PtpIpCommandPublisher.kt

index ecf9fc3..64bdf03 100644 (file)
@@ -65,7 +65,7 @@ public class NikonInterfaceProvider implements IPtpIpInterfaceProvider, IDisplay
     {
         this.activity = context;
         commandPublisher = new PtpIpCommandPublisher(CAMERA_IP, CONTROL_PORT, true, false);
-        liveViewControl = new NikonLiveViewControl(context, this, 20);
+        liveViewControl = new NikonLiveViewControl(context, this, 30);
         asyncReceiver = new PtpIpAsyncResponseReceiver(CAMERA_IP, ASYNC_RESPONSE_PORT);
         statusChecker = new NikonStatusChecker(activity, commandPublisher, CAMERA_IP, EVENT_PORT);
         canonConnection = new NikonConnection(context, provider, this, statusChecker);
index db9862b..cb07f3a 100644 (file)
@@ -64,13 +64,13 @@ public class NikonLiveViewRequestMessage extends PtpIpCommandBase
     @Override
     public boolean isRetrySend()
     {
-        return (true);
+        return (false);
     }
 
     @Override
     public int maxRetryCount()
     {
-        return (5);
+        return (3);
     }
 
     @Override
index 07cf62e..53a5450 100644 (file)
@@ -338,10 +338,12 @@ class PtpIpCommandPublisher(private val ipAddress : String, private val portNumb
         return (if (callback != null && callback.isReceiveMulti)
         {
             // 受信したら逐次「受信したよ」と応答するパターン
+            Log.v(TAG, " receiveMulti() : $delayMs [id:${command.id}]")
             receiveMulti(command, delayMs)
         }
         else
         {
+            Log.v(TAG, " receiveSingle() : $delayMs [id:${command.id}]")
             receiveSingle(command, delayMs)
         })
         //  受信した後、すべてをまとめて「受信したよ」と応答するパターン
@@ -445,6 +447,8 @@ class PtpIpCommandPublisher(private val ipAddress : String, private val portNumb
                     Log.v(TAG, " --- SEND RETRY ---")
                     return (true)
                 }
+                callback?.receivedMessage(id, null)
+                return (false)
             }
             var targetLength: Int
             var receivedLength: Int