• R/O
  • HTTP
  • SSH
  • HTTPS

PKRemote: Commit

Pentax DSLR Remote Control app.


Commit MetaInfo

Révision1642aa0f95332e43bdb42fb14033a016cf4ec682 (tree)
l'heure2021-01-03 00:11:56
AuteurMRSa <mrsa@myad...>
CommiterMRSa

Message de Log

IXY210でスモール画像を取得できるようにするその2。(スモール画像取得シーケンス TYPE1対応)

Change Summary

Modification

--- 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
651651 }
652652 if (byte_array[offset + 4].toUByte().toInt() == 0x09)
653653 {
654- // データバイト...
654+ // データバイト... (Start Data Packet で データレングスを特定する
655655 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)
656656 }
657657 }
--- 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
3636 private String raw_suffix = "CR2";
3737 private boolean useScreennailImage = false;
3838 private final CanonImageObjectReceiver canonImageObjectReceiver;
39+ private int smallImageSequence = 0;
3940
4041 public CanonPlaybackControl(Activity activity, PtpIpInterfaceProvider provider)
4142 {
42- int smallImageSequence = 0;
4343 int delayMs = 20;
4444 try
4545 {
@@ -147,7 +147,14 @@ public class CanonPlaybackControl implements IPlaybackControl
147147
148148 // 画像を取得する
149149 CanonScreennailImageReceiver receiver = new CanonScreennailImageReceiver(activity, objectId, publisher, callback);
150- publisher.enqueueCommand(new CanonRequestInnerDevelopStart(receiver, objectId, true, objectId, objectId, 0x0f, 0x02)); // 0x9141 : RequestInnerDevelopStart
150+ if (smallImageSequence == 1)
151+ {
152+ publisher.enqueueCommand(new CanonRequestInnerDevelopStart(receiver, objectId, true, objectId, objectId, 0x06, 0x02)); // 0x9141 : RequestInnerDevelopStart
153+ }
154+ else
155+ {
156+ publisher.enqueueCommand(new CanonRequestInnerDevelopStart(receiver, objectId, true, objectId, objectId, 0x0f, 0x02)); // 0x9141 : RequestInnerDevelopStart
157+ }
151158 }
152159 }
153160 catch (Exception e)
--- a/app/src/main/res/values-ja/strings.xml
+++ b/app/src/main/res/values-ja/strings.xml
@@ -379,6 +379,6 @@
379379 <string name="pref_summary_canon_connection_mode">通常、変更は不要です (初期値: TYPE0)</string>
380380
381381 <string name="pref_canon_small_picture_type">スモール画像取得シーケンス</string>
382- <string name="pref_summary_canon_small_picture_type">(初期値: TYPE0)</string>
382+ <string name="pref_summary_canon_small_picture_type">スモール画像がうまく取得できない場合、設定を変更してみてください。 (初期値: TYPE0)</string>
383383
384384 </resources>
Afficher sur ancien navigateur de dépôt.