Pentax DSLR Remote Control app.
Révision | 1642aa0f95332e43bdb42fb14033a016cf4ec682 (tree) |
---|---|
l'heure | 2021-01-03 00:11:56 |
Auteur | MRSa <mrsa@myad...> |
Commiter | MRSa |
IXY210でスモール画像を取得できるようにするその2。(スモール画像取得シーケンス TYPE1対応)
@@ -651,7 +651,7 @@ class PtpIpCommandPublisher(private val ipAddress : String, private val portNumb | ||
651 | 651 | } |
652 | 652 | if (byte_array[offset + 4].toUByte().toInt() == 0x09) |
653 | 653 | { |
654 | - // データバイト... | |
654 | + // データバイト... (Start Data Packet で データレングスを特定する | |
655 | 655 | 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) |
656 | 656 | } |
657 | 657 | } |
@@ -36,10 +36,10 @@ public class CanonPlaybackControl implements IPlaybackControl | ||
36 | 36 | private String raw_suffix = "CR2"; |
37 | 37 | private boolean useScreennailImage = false; |
38 | 38 | private final CanonImageObjectReceiver canonImageObjectReceiver; |
39 | + private int smallImageSequence = 0; | |
39 | 40 | |
40 | 41 | public CanonPlaybackControl(Activity activity, PtpIpInterfaceProvider provider) |
41 | 42 | { |
42 | - int smallImageSequence = 0; | |
43 | 43 | int delayMs = 20; |
44 | 44 | try |
45 | 45 | { |
@@ -147,7 +147,14 @@ public class CanonPlaybackControl implements IPlaybackControl | ||
147 | 147 | |
148 | 148 | // 画像を取得する |
149 | 149 | 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 | + } | |
151 | 158 | } |
152 | 159 | } |
153 | 160 | catch (Exception e) |
@@ -379,6 +379,6 @@ | ||
379 | 379 | <string name="pref_summary_canon_connection_mode">通常、変更は不要です (初期値: TYPE0)</string> |
380 | 380 | |
381 | 381 | <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> | |
383 | 383 | |
384 | 384 | </resources> |