diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2007-07-18 07:30:13 +0000 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2007-07-18 07:30:13 +0000 |
commit | bf8d880f6e1ae36881e21e560bbd12286e2d2bed (patch) | |
tree | 6dd695ef3aea2c849571ec81777608dd63d1614b | |
parent | 49f66a8408c3547694032ae5fca7dc1dd0a65da7 (diff) | |
download | libgphoto2-bf8d880f6e1ae36881e21e560bbd12286e2d2bed.tar.gz |
allow configuring EOS camera time.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@10446 67ed7778-7388-44ab-90cf-0a291f65f57c
-rw-r--r-- | camlibs/ptp2/ChangeLog | 6 | ||||
-rw-r--r-- | camlibs/ptp2/config.c | 1 | ||||
-rw-r--r-- | camlibs/ptp2/ptp-pack.c | 8 |
3 files changed, 15 insertions, 0 deletions
diff --git a/camlibs/ptp2/ChangeLog b/camlibs/ptp2/ChangeLog index eb0baa58d..4499c167e 100644 --- a/camlibs/ptp2/ChangeLog +++ b/camlibs/ptp2/ChangeLog @@ -1,3 +1,9 @@ +2007-07-18 Marcus Meissner <marcus@jet.franken.de> + + * ptp.c,ptp.h: Added PTP reset handling (from libmtp). + + * ptp-pack.c, config.c: Handle EOS CameraTime (just a UNIX timestamp again) + 2007-07-17 Marcus Meissner <marcus@jet.franken.de> * library.c: Added Canon PowerShot S5 IS. diff --git a/camlibs/ptp2/config.c b/camlibs/ptp2/config.c index b76e2d7f7..b44526c60 100644 --- a/camlibs/ptp2/config.c +++ b/camlibs/ptp2/config.c @@ -2583,6 +2583,7 @@ static struct submenu camera_settings_menu[] = { { N_("Camera Model"), "model", PTP_DPC_CANON_CameraModel, PTP_VENDOR_CANON, PTP_DTC_STR, _get_STR, _put_None }, { N_("Firmware Version"), "firmwareversion", PTP_DPC_CANON_FirmwareVersion, PTP_VENDOR_CANON, PTP_DTC_UINT32, _get_CANON_FirmwareVersion, _put_None }, { N_("Camera Time"), "time", PTP_DPC_CANON_UnixTime, PTP_VENDOR_CANON, PTP_DTC_UINT32, _get_UINT32_as_time, _put_UINT32_as_time }, + { N_("Camera Time"), "eos-time", PTP_DPC_CANON_EOS_CameraTime, PTP_VENDOR_CANON, PTP_DTC_UINT32, _get_UINT32_as_time, _put_UINT32_as_time }, { N_("Camera Time"), "time", PTP_DPC_DateTime, 0, PTP_DTC_STR, _get_STR_as_time, _put_STR_as_time }, { N_("Beep Mode"), "beep", PTP_DPC_CANON_BeepMode, PTP_VENDOR_CANON, PTP_DTC_UINT8, _get_Canon_BeepMode, _put_Canon_BeepMode }, { N_("Image Comment"), "imgcomment", PTP_DPC_NIKON_ImageCommentString, PTP_VENDOR_NIKON, PTP_DTC_STR, _get_STR, _put_STR }, diff --git a/camlibs/ptp2/ptp-pack.c b/camlibs/ptp2/ptp-pack.c index 793edc502..9c889253b 100644 --- a/camlibs/ptp2/ptp-pack.c +++ b/camlibs/ptp2/ptp-pack.c @@ -1173,6 +1173,9 @@ ptp_unpack_CANON_changes (PTPParams *params, unsigned char* data, int datasize, } dpd = ¶ms->canon_props[j].dpd; switch (proptype) { + case PTP_DPC_CANON_EOS_CameraTime: + dpd->DataType = PTP_DTC_UINT32; + break; case PTP_DPC_CANON_EOS_Aperture: case PTP_DPC_CANON_EOS_ShutterSpeed: case PTP_DPC_CANON_EOS_ISOSpeed: @@ -1192,6 +1195,11 @@ ptp_unpack_CANON_changes (PTPParams *params, unsigned char* data, int datasize, break; } switch (dpd->DataType) { + case PTP_DTC_UINT32: + dpd->FactoryDefaultValue.u32 = dtoh32a(data); + dpd->CurrentValue.u32 = dtoh32a(data); + /*fprintf (stderr,"currentvalue of %x is %x\n", proptype, dpd->CurrentValue.u16);*/ + break; case PTP_DTC_UINT16: dpd->FactoryDefaultValue.u16 = dtoh16a(data); dpd->CurrentValue.u16 = dtoh16a(data); |