From ae042beefe5f4a85b993c8732cf2cc4547fca73a Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Tue, 20 Sep 2011 21:42:00 +0000 Subject: [PATCH] added clean sensor config git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@13710 67ed7778-7388-44ab-90cf-0a291f65f57c --- camlibs/ptp2/config.c | 10 +++++++++- camlibs/ptp2/ptp.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/camlibs/ptp2/config.c b/camlibs/ptp2/config.c index 636c8a8fe..ef9cdf50a 100644 --- a/camlibs/ptp2/config.c +++ b/camlibs/ptp2/config.c @@ -2454,7 +2454,6 @@ static struct deviceproptableu16 capture_mode[] = { }; GENERIC16TABLE(CaptureMode,capture_mode) - static struct deviceproptableu16 focus_metering[] = { { N_("Centre-spot"), 0x0001, 0 }, { N_("Multi-spot"), 0x0002, 0 }, @@ -3359,6 +3358,14 @@ static struct deviceproptableu8 nikon_bracketset[] = { }; GENERIC8TABLE(Nikon_BracketSet,nikon_bracketset) +static struct deviceproptableu8 nikon_cleansensor[] = { + { N_("Off"), 0, 0 }, + { N_("Startup"), 1, 0 }, + { N_("Shutdown"), 2, 0 }, + { N_("Startup and Shutdown"), 3, 0 }, +}; +GENERIC8TABLE(Nikon_CleanSensor,nikon_cleansensor) + static struct deviceproptableu8 nikon_saturation[] = { { N_("Normal"), 0, 0 }, { N_("Moderate"), 1, 0 }, @@ -5030,6 +5037,7 @@ static struct submenu camera_settings_menu[] = { { N_("Owner Name"), "ownername", PTP_DPC_CANON_EOS_Owner, PTP_VENDOR_CANON, PTP_DTC_STR, _get_STR, _put_STR}, { N_("Artist"), "artist", PTP_DPC_CANON_EOS_Artist, PTP_VENDOR_CANON, PTP_DTC_STR, _get_STR, _put_STR}, { N_("Copyright"), "copyright", PTP_DPC_CANON_EOS_Copyright, PTP_VENDOR_CANON, PTP_DTC_STR, _get_STR, _put_STR}, + { N_("Clean Sensor"), "cleansensor", PTP_DPC_NIKON_CleanImageSensor, PTP_VENDOR_CANON, PTP_DTC_UINT8, _get_Nikon_CleanSensor, _put_Nikon_CleanSensor}, /* virtual */ { N_("Fast Filesystem"), "fastfs", 0, PTP_VENDOR_NIKON, 0, _get_Nikon_FastFS, _put_Nikon_FastFS }, diff --git a/camlibs/ptp2/ptp.h b/camlibs/ptp2/ptp.h index 7f38c06e5..04d5ab397 100644 --- a/camlibs/ptp2/ptp.h +++ b/camlibs/ptp2/ptp.h @@ -1571,6 +1571,7 @@ typedef struct _PTPCanonEOSDeviceInfo { #define PTP_DPC_NIKON_FunctionButton2 0xD08C #define PTP_DPC_NIKON_AFAreaPoint 0xD08D #define PTP_DPC_NIKON_NormalAFOn 0xD08E +#define PTP_DPC_NIKON_CleanImageSensor 0xD08F #define PTP_DPC_NIKON_ImageCommentString 0xD090 #define PTP_DPC_NIKON_ImageCommentEnable 0xD091 #define PTP_DPC_NIKON_ImageRotation 0xD092