summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2006-04-11 16:58:33 +0000
committerMarcus Meissner <marcus@jet.franken.de>2006-04-11 16:58:33 +0000
commit965f6714da309067ab90cf34299764f0d2af6812 (patch)
tree97e870bedca8f6b0e6dae6a28c8abfd5c810d017
parent13935fa9abd02b7370365c86d931e62c558737f7 (diff)
downloadlibgphoto2-965f6714da309067ab90cf34299764f0d2af6812.tar.gz
initialize size to 0.
switch viewfinder off after preview capture on canon. added 2 more nikon bool properties. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8742 67ed7778-7388-44ab-90cf-0a291f65f57c
-rw-r--r--camlibs/ptp2/cameras/nikon-d70s.txt4
-rw-r--r--camlibs/ptp2/library.c6
2 files changed, 6 insertions, 4 deletions
diff --git a/camlibs/ptp2/cameras/nikon-d70s.txt b/camlibs/ptp2/cameras/nikon-d70s.txt
index 728e285d3..6228dd613 100644
--- a/camlibs/ptp2/cameras/nikon-d70s.txt
+++ b/camlibs/ptp2/cameras/nikon-d70s.txt
@@ -231,10 +231,10 @@ Flash Shutter Speed(0xd075):(readwrite) (type=0x2) Range [0 - 11, step 1] value:
Bracket Set(0xd078):(readwrite) (type=0x2) Range [0 - 3, step 1] value: 0
Bracket Order(0xd07a):(readwrite) (type=0x2) Range [0 - 1, step 1] value: 0
Reverse Command Dial(0xd086):(readwrite) (type=0x2) Range [0 - 1, step 1] value: Off (0)
-No CF Card Release(0xd08a):(readwrite) (type=0x2) Range [0 - 1, step 1] value: Off (1)
+ No CF Card Release(0xd08a):(readwrite) (type=0x2) Range [0 - 1, step 1] value: Off (1)
Image Comment String(0xd090):(readwrite) (type=0xffff) ' '
Property 0xd091:(readwrite) (type=0x2) Range [0 - 1, step 1] value: 0
-Image Rotation(0xd092):(readwrite) (type=0x2) Range [0 - 1, step 1] value: On (0)
+ Image Rotation(0xd092):(readwrite) (type=0x2) Range [0 - 1, step 1] value: On (0)
Exposure Bracketing(0xd0c0):(readwrite) (type=0x2) Range [0 - 1, step 1] value: Off (0)
Exposure Bracketing Number(0xd0c2):(readwrite) (type=0x2) Range [0 - 2, step 1] value: 2
Property 0xd0c3:(read only) (type=0x2) Range [1 - 3, step 1] value: 1
diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c
index 9ff3fe00d..4fa327343 100644
--- a/camlibs/ptp2/library.c
+++ b/camlibs/ptp2/library.c
@@ -1128,7 +1128,7 @@ static int
camera_capture_preview (Camera *camera, CameraFile *file, GPContext *context)
{
unsigned char *data = NULL;
- uint32_t size;
+ uint32_t size = 0;
int ret;
PTPParams *params = &camera->pl->params;
@@ -1158,7 +1158,7 @@ camera_capture_preview (Camera *camera, CameraFile *file, GPContext *context)
/* Add an arbitrary file name so caller won't crash */
gp_file_set_name (file, "canon_preview.jpg");
- ret = ptp_canon_viewfinderon (params);
+ ret = ptp_canon_viewfinderoff (params);
if (ret != PTP_RC_OK) {
gp_context_error (context, _("Canon disable viewfinder failed: %d"), ret);
return GP_ERROR;
@@ -3417,6 +3417,8 @@ static struct submenu capture_settings_menu[] = {
{ N_("Flash Sign"), "flashsign", PTP_DPC_NIKON_FlashSign, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_OnOff_UINT8, _put_Nikon_OnOff_UINT8},
{ N_("Viewfinder Grid"), "viewfindergrid", PTP_DPC_NIKON_GridDisplay, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_OnOff_UINT8, _put_Nikon_OnOff_UINT8},
{ N_("Image Review"), "imagereview", PTP_DPC_NIKON_ImageReview, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_OnOff_UINT8, _put_Nikon_OnOff_UINT8},
+ { N_("Image Rotation Flag"), "imagerotationflag", PTP_DPC_NIKON_ImageRotation, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_OnOff_UINT8, _put_Nikon_OnOff_UINT8},
+ { N_("Release without CF card"), "nocfcardrelease", PTP_DPC_NIKON_NoCFCard, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_OnOff_UINT8, _put_Nikon_OnOff_UINT8},
{ N_("Flash Mode Manual Power"), "flashmodemanualpower", PTP_DPC_NIKON_FlashModeManualPower, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_FlashModeManualPower, _put_Nikon_FlashModeManualPower},
{ N_("Auto Focus Area Power"), "autofocusarea", PTP_DPC_NIKON_AutofocusArea, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_AutofocusArea, _put_Nikon_AutofocusArea},
{ N_("Flash Exposure Compensation"), "flashexposurecompensation", PTP_DPC_NIKON_FlashExposureCompensation, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_FlashExposureCompensation, _put_Nikon_FlashExposureCompensation},