Hi Marcus,

thanks for applying my previous patch. Unfortunately, some more
tweaking is needed, as I've noticed one more button value (7), reported
in drive mode while the timer is working. So see the
eos_m_drive_mode.patch attachment.

Note that, if you wish to test it with M10, you'll need a WiFi
connection, as M10 always reports a "single shot" mode after
establishing a PTP connection (no matter, which value has previously
been set in the camera), and you can't change it over USB (doing so, as
with any /main/capturesettings/* settings, will cause the camera to
hang). There is no such problem if you connect via WiFi.

The second patch adds a comment on the 0x20 OLCInfoChanged mask to
ptp-pack.c: probably a useful info, even if not directly used right now.

-- 
Regards,
Alexey Kryukov <anagnost at yandex dot ru>

Moscow State University
Faculty of History
--- ptp-pack.c.orig	2018-03-15 12:11:33.000000000 +0300
+++ ptp-pack.c	2018-03-16 21:26:05.759545925 +0300
@@ -2486,7 +2486,10 @@
 				i++;
 			}
 			if (mask & 0x0020) {
-				/* mask 0x0020: 6 bytes, 00 00 00 00 00 00 observed */
+				/* mask 0x0020: 6 bytes, 00 00 00 00 00 00 observed.
+				 * This seems to be the self-timer record: when active,
+				 * has the form of 00 00 01 00 XX XX, where the last two bytes
+				 * stand for the number of seconds remaining until the shot */
 				ce[i].type = PTP_CANON_EOS_CHANGES_TYPE_UNKNOWN;
 				ce[i].u.info = malloc(strlen("OLCInfo event 0x0020 content 0123456789ab")+1); 
 				sprintf(ce[i].u.info,"OLCInfo event 0x0020 content %02x%02x%02x%02x%02x%02x",
--- library.c.orig	2018-03-15 12:11:33.000000000 +0300
+++ library.c	2018-03-16 21:26:35.123631794 +0300
@@ -3472,6 +3472,9 @@
 							 * would precede any other value (unless in MF mode).
 							 * So skip it and look for another button reported */
 							case 2:
+							/* Reported in the self-timer mode during the delay
+							 * period. May be followed by 1, 3 or 4 */
+							case 7:
 								continue;
 							/* Full-Press successful */
 							case 4:
@@ -3491,6 +3494,8 @@
 			/* full release now (even if the press has failed) */
 			C_PTP_REP_MSG (ptp_canon_eos_remotereleaseoff (params, 3), _("Canon EOS M Full-Release failed"));
 			ptp_check_eos_events (params);
+			/* NB: no error is returned in case of button == 7, which means
+			 * the timer is still working, but no AF fail has been reported */
 			if (button < 4)
 				return GP_ERROR;
 		}
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gphoto-devel mailing list
Gphoto-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gphoto-devel

Reply via email to