summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2020-04-18 19:13:55 +0200
committerMarcus Meissner <marcus@jet.franken.de>2020-04-18 19:13:55 +0200
commit79c66ce53243fc97cf17b4fa68584270a2287d99 (patch)
tree4e11293afdd4e2f05eae47311c762442d6f1485b
parent5cf1f2f2b5c9de5189149c76323749e08388683c (diff)
downloadlibgphoto2-79c66ce53243fc97cf17b4fa68584270a2287d99.tar.gz
shutterspeed is also 7 bytes on type 0x11
-rw-r--r--camlibs/ptp2/cameras/canon-eos-r.txt23
-rw-r--r--camlibs/ptp2/ptp-pack.c8
2 files changed, 21 insertions, 10 deletions
diff --git a/camlibs/ptp2/cameras/canon-eos-r.txt b/camlibs/ptp2/cameras/canon-eos-r.txt
index a56c9f455..5e6f805ed 100644
--- a/camlibs/ptp2/cameras/canon-eos-r.txt
+++ b/camlibs/ptp2/cameras/canon-eos-r.txt
@@ -3009,36 +3009,43 @@ event 262: unknown EOS event c1f6
11: 00
olcinfoversion is 17
event 263: EOS event OLCInfoChanged (size 92)
- 0: 58
+ 0: 58 size
1: 00
2: 00
3: 00
- 4: ff
+
+ 4: ff mask
5: 1f
6: 00
7: 00
- 8: 01
+
+ 8: 01 button (2)
9: 04
- 10: 01
+
+ 10: 01 shutterspeed
11: 01
12: a0
13: 0c
14: 00
15: 0c
16: 00
- 17: 01
+
+ 17: 01 aperture
18: 01
19: 50
20: 28
21: 38
22: 00
- 23: 01
+
+ 23: 01 iso
24: 01
25: 00
26: 68
- 27: 6d
+
+ 27: 6d perhaps still iso
28: 28
- 29: 04
+
+ 29: 04 ....
30: 01
31: 05
32: f6
diff --git a/camlibs/ptp2/ptp-pack.c b/camlibs/ptp2/ptp-pack.c
index 9cb13404c..f5ee4e592 100644
--- a/camlibs/ptp2/ptp-pack.c
+++ b/camlibs/ptp2/ptp-pack.c
@@ -2467,6 +2467,7 @@ ptp_unpack_CANON_changes (PTPParams *params, unsigned char* data, int datasize,
* 70D: 8
* 5Dsr: b
* 200D: f
+ * EOS R: 11
*/
case PTP_EC_CANON_EOS_OLCInfoChanged: {
uint32_t len, curoff;
@@ -2515,6 +2516,8 @@ ptp_unpack_CANON_changes (PTPParams *params, unsigned char* data, int datasize,
/* this seesm to be the shutter speed record */
/* EOS 200D seems to have 7 bytes here, sample:
* 7 bytes: 01 03 98 10 00 70 00
+ * EOS R also 7 bytes
+ * 7 bytes: 01 01 a0 0c 00 0c 00
*/
proptype = PTP_DPC_CANON_EOS_ShutterSpeed;
dpd = _lookup_or_allocate_canon_prop(params, proptype);
@@ -2525,7 +2528,8 @@ ptp_unpack_CANON_changes (PTPParams *params, unsigned char* data, int datasize,
/* hack to differ between older EOS and EOS 200D newer */
switch (olcver) {
case 0xf:
- curoff += 7; /* f (200D), 8 (M10) */
+ case 0x11:
+ curoff += 7; /* f (200D), 8 (M10) ???, 11 is EOS R */
break;
case 0x7:
case 0x8: /* EOS 70D */
@@ -2551,7 +2555,7 @@ ptp_unpack_CANON_changes (PTPParams *params, unsigned char* data, int datasize,
ce[i].type = PTP_CANON_EOS_CHANGES_TYPE_PROPERTY;
ce[i].u.propid = proptype;
if (olcver >= 0xf) {
- curoff += 6; /* f */
+ curoff += 6; /* f, 11 */
} else {
curoff += 5; /* 7, 8, b */
}