From 1642aa0f95332e43bdb42fb14033a016cf4ec682 Mon Sep 17 00:00:00 2001 From: MRSa Date: Sun, 3 Jan 2021 00:11:56 +0900 Subject: [PATCH] =?utf8?q?IXY210=E3=81=A7=E3=82=B9=E3=83=A2=E3=83=BC?= =?utf8?q?=E3=83=AB=E7=94=BB=E5=83=8F=E3=82=92=E5=8F=96=E5=BE=97=E3=81=A7?= =?utf8?q?=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=99=E3=82=8B?= =?utf8?q?=E3=81=9D=E3=81=AE=EF=BC=92=E3=80=82(=E3=82=B9=E3=83=A2=E3=83=BC?= =?utf8?q?=E3=83=AB=E7=94=BB=E5=83=8F=E5=8F=96=E5=BE=97=E3=82=B7=E3=83=BC?= =?utf8?q?=E3=82=B1=E3=83=B3=E3=82=B9=20TYPE1=E5=AF=BE=E5=BF=9C)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../vendor/ptpip/wrapper/command/PtpIpCommandPublisher.kt | 2 +- .../vendor/ptpip/wrapper/playback/CanonPlaybackControl.java | 11 +++++++++-- app/src/main/res/values-ja/strings.xml | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/net/osdn/gokigen/pkremote/camera/vendor/ptpip/wrapper/command/PtpIpCommandPublisher.kt b/app/src/main/java/net/osdn/gokigen/pkremote/camera/vendor/ptpip/wrapper/command/PtpIpCommandPublisher.kt index b181035..71fdae6 100644 --- a/app/src/main/java/net/osdn/gokigen/pkremote/camera/vendor/ptpip/wrapper/command/PtpIpCommandPublisher.kt +++ b/app/src/main/java/net/osdn/gokigen/pkremote/camera/vendor/ptpip/wrapper/command/PtpIpCommandPublisher.kt @@ -651,7 +651,7 @@ class PtpIpCommandPublisher(private val ipAddress : String, private val portNumb } if (byte_array[offset + 4].toUByte().toInt() == 0x09) { - // データバイト... + // データバイト... (Start Data Packet で データレングスを特定する lenlen = (byte_array[offset + 15].toUByte().toInt() and 0xff shl 24) + (byte_array[offset + 14].toUByte().toInt() and 0xff shl 16) + (byte_array[offset + 13].toUByte().toInt() and 0xff shl 8) + (byte_array[offset + 12].toUByte().toInt() and 0xff) } } diff --git a/app/src/main/java/net/osdn/gokigen/pkremote/camera/vendor/ptpip/wrapper/playback/CanonPlaybackControl.java b/app/src/main/java/net/osdn/gokigen/pkremote/camera/vendor/ptpip/wrapper/playback/CanonPlaybackControl.java index bf250b7..a6fce5e 100644 --- a/app/src/main/java/net/osdn/gokigen/pkremote/camera/vendor/ptpip/wrapper/playback/CanonPlaybackControl.java +++ b/app/src/main/java/net/osdn/gokigen/pkremote/camera/vendor/ptpip/wrapper/playback/CanonPlaybackControl.java @@ -36,10 +36,10 @@ public class CanonPlaybackControl implements IPlaybackControl private String raw_suffix = "CR2"; private boolean useScreennailImage = false; private final CanonImageObjectReceiver canonImageObjectReceiver; + private int smallImageSequence = 0; public CanonPlaybackControl(Activity activity, PtpIpInterfaceProvider provider) { - int smallImageSequence = 0; int delayMs = 20; try { @@ -147,7 +147,14 @@ public class CanonPlaybackControl implements IPlaybackControl // 画像を取得する CanonScreennailImageReceiver receiver = new CanonScreennailImageReceiver(activity, objectId, publisher, callback); - publisher.enqueueCommand(new CanonRequestInnerDevelopStart(receiver, objectId, true, objectId, objectId, 0x0f, 0x02)); // 0x9141 : RequestInnerDevelopStart + if (smallImageSequence == 1) + { + publisher.enqueueCommand(new CanonRequestInnerDevelopStart(receiver, objectId, true, objectId, objectId, 0x06, 0x02)); // 0x9141 : RequestInnerDevelopStart + } + else + { + publisher.enqueueCommand(new CanonRequestInnerDevelopStart(receiver, objectId, true, objectId, objectId, 0x0f, 0x02)); // 0x9141 : RequestInnerDevelopStart + } } } catch (Exception e) diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 4c607b8..e0931e3 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -379,6 +379,6 @@ 通常、変更は不要です (初期値: TYPE0) スモール画像取得シーケンス - (初期値: TYPE0) + スモール画像がうまく取得できない場合、設定を変更してみてください。 (初期値: TYPE0) -- 2.11.0