From: Mariusz W. <ki...@us...> - 2004-07-16 19:21:25
|
Update of /cvsroot/gphoto/libgphoto2/camlibs/ptp2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16370 Modified Files: ChangeLog library.c ptp.h Log Message: Aadded NIKON extension code and clear halt fixup by Corey Manders Index: ptp.h =================================================================== RCS file: /cvsroot/gphoto/libgphoto2/camlibs/ptp2/ptp.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- ptp.h 2 Jan 2004 18:43:05 -0000 1.16 +++ ptp.h 16 Jul 2004 19:21:14 -0000 1.17 @@ -537,6 +537,90 @@ #define PTP_DPC_CANON_AssistLight 0xD041 #define PTP_DPC_CANON_D045 0xD045 +/* Nikon extension device property codes */ +#define PTP_DPC_NIKON_ShootingBank 0xD010 +#define PTP_DPC_NIKON_ShootingBankNameA 0xD011 +#define PTP_DPC_NIKON_ShootingBankNameB 0xD012 +#define PTP_DPC_NIKON_ShootingBankNameC 0xD013 +#define PTP_DPC_NIKON_ShootingBankNameD 0xD014 +#define PTP_DPC_NIKON_RawCompression 0xD016 +#define PTP_DPC_NIKON_WhiteBalanceAutoBias 0xD017 +#define PTP_DPC_NIKON_WhiteBalanceTungstenBias 0xD018 +#define PTP_DPC_NIKON_WhiteBalanceFlourescentBias 0xD019 +#define PTP_DPC_NIKON_WhiteBalanceDaylightBias 0xD01a +#define PTP_DPC_NIKON_WhiteBalanceFlashBias 0xD01b +#define PTP_DPC_NIKON_WhiteBalanceCloudyBias 0xD01c +#define PTP_DPC_NIKON_WhiteBalanceShadeBias 0xD01d +#define PTP_DPC_NIKON_WhiteBalanceColourTemperature 0xD01e +#define PTP_DPC_NIKON_ImageSharpening 0xD02a +#define PTP_DPC_NIKON_ToneCompensation 0xD02b +#define PTP_DPC_NIKON_ColourMode 0xD02c +#define PTP_DPC_NIKON_HueAdjustment 0xD02d +#define PTP_DPC_NIKON_NonCPULensDataFocalLength 0xD02e +#define PTP_DPC_NIKON_NonCPULensDataMaximumAperature 0xD02f +#define PTP_DPC_NIKON_CSMMenuBankSelect 0xD040 +#define PTP_DPC_NIKON_MenuBankNameA 0xD041 +#define PTP_DPC_NIKON_MenuBankNameB 0xD042 +#define PTP_DPC_NIKON_MenuBankNameC 0xD043 +#define PTP_DPC_NIKON_MenuBankNameD 0xD044 +#define PTP_DPC_NIKON_A1AFCModePriority 0xD048 +#define PTP_DPC_NIKON_A2AFSModePriority 0xD049 +#define PTP_DPC_NIKON_A3GroupDynamicAF 0xD04a +#define PTP_DPC_NIKON_A4AFActivation 0xD04b +#define PTP_DPC_NIKON_A5FocusAreaIllumManualFocus 0xD04c +#define PTP_DPC_NIKON_FocusAreaIllumContinuous 0xD04d +#define PTP_DPC_NIKON_FocusAreaIllumWhenSelected 0xD04e +#define PTP_DPC_NIKON_A6FocusArea 0xD04f +#define PTP_DPC_NIKON_A7VerticalAFON 0xD050 +#define PTP_DPC_NIKON_B1ISOAuto 0xD054 +#define PTP_DPC_NIKON_B2ISOStep 0xD055 +#define PTP_DPC_NIKON_B3EVStep 0xD056 +#define PTP_DPC_NIKON_B4ExposureCompEv 0xD057 +#define PTP_DPC_NIKON_B5ExposureComp 0xD058 +#define PTP_DPC_NIKON_B6CenterWeightArea 0xD059 +#define PTP_DPC_NIKON_C1AELock 0xD05e +#define PTP_DPC_NIKON_C2AELAFL 0xD05f +#define PTP_DPC_NIKON_C3AutoMeterOff 0xD062 +#define PTP_DPC_NIKON_C4SelfTimer 0xD063 +#define PTP_DPC_NIKON_C5MonitorOff 0xD064 +#define PTP_DPC_NIKON_D1ShootingSpeed 0xD068 +#define PTP_DPC_NIKON_D2MaximumShots 0xD069 +#define PTP_DPC_NIKON_D3ExpDelayMode 0xD06a +#define PTP_DPC_NIKON_D4LongExposureNoiseReduction 0xD06b +#define PTP_DPC_NIKON_D5FileNumberSequence 0xD06c +#define PTP_DPC_NIKON_D6ControlPanelFinderRearControl 0xD06d +#define PTP_DPC_NIKON_ControlPanelFinderViewfinder 0xD06e +#define PTP_DPC_NIKON_D7Illumination 0xD06f +#define PTP_DPC_NIKON_E1FlashSyncSpeed 0xD074 +#define PTP_DPC_NIKON_E2FlashShutterSpeed 0xD075 +#define PTP_DPC_NIKON_E3AAFlashMode 0xD076 +#define PTP_DPC_NIKON_E4ModelingFlash 0xD077 +#define PTP_DPC_NIKON_E5AutoBracketySet 0xD078 +#define PTP_DPC_NIKON_E6ManualModeBracketing 0xD079 +#define PTP_DPC_NIKON_E7AutoBracketOrder 0xD07a +#define PTP_DPC_NIKON_E8AutoBracketSelection 0xD07b +#define PTP_DPC_NIKON_F1CenterButtonShootingMode 0xD080 +#define PTP_DPC_NIKON_CenterButtonPlaybackMode 0xD081 +#define PTP_DPC_NIKON_F2Multiselector 0xD082 +#define PTP_DPC_NIKON_F3PhotoInfoPlayback 0xD083 +#define PTP_DPC_NIKON_F4AssignFuncButton 0xD084 +#define PTP_DPC_NIKON_F5CustomizeCommDials 0xD085 +#define PTP_DPC_NIKON_ChangeMainSub 0xD086 +#define PTP_DPC_NIKON_AperatureSetting 0xD087 +#define PTP_DPC_NIKON_MenusAndPlayback 0xD088 +#define PTP_DPC_NIKON_F6ButtonsAndDials 0xD089 +#define PTP_DPC_NIKON_F7NoCFCard 0xD08a +#define PTP_DPC_NIKON_AutoImageRotation 0xD092 +#define PTP_DPC_NIKON_ExposureBracketingOnOff 0xD0c0 +#define PTP_DPC_NIKON_ExposureBracketingIntervalDist 0xD0c1 +#define PTP_DPC_NIKON_ExposureBracketingNumBracketPlace 0xD0c2 +#define PTP_DPC_NIKON_AutofocusLCDTopMode2 0xD107 +#define PTP_DPC_NIKON_AutofocusLCDTopMode3AndMode4 0xD108 +#define PTP_DPC_NIKON_LightMeter 0xD10a +#define PTP_DPC_NIKON_ExposureAperatureLock(ReadOnly) 0xD111 +#define PTP_DPC_NIKON_MaximumShots 0xD103 + + /* Device Property Form Flag */ #define PTP_DPFF_None 0x00 Index: library.c =================================================================== RCS file: /cvsroot/gphoto/libgphoto2/camlibs/ptp2/library.c,v retrieving revision 1.101 retrieving revision 1.102 diff -u -d -r1.101 -r1.102 --- library.c 5 Jul 2004 17:27:37 -0000 1.101 +++ library.c 16 Jul 2004 19:21:14 -0000 1.102 @@ -26,6 +26,7 @@ #include <gphoto2-library.h> #include <gphoto2-port-log.h> + #ifdef ENABLE_NLS # include <libintl.h> # undef _ @@ -613,18 +614,22 @@ /* get port settings */ CR (gp_port_get_settings (camera->port, &settings)); - if (camera->pl) { -#if 0 - /* it won't hurt */ - GP_DEBUG ("Clearing STALL condition on ep: 0x%x", - settings.usb.outep); - gp_port_usb_clear_halt(camera->port, settings.usb.outep); -#endif + if (camera->pl!=NULL) { /* close ptp session */ ptp_closesession (&camera->pl->params); free (camera->pl); camera->pl = NULL; } + if (camera->port!=NULL) { + /* clear halt */ + gp_port_usb_clear_halt + (camera->port, GP_PORT_USB_ENDPOINT_IN); + gp_port_usb_clear_halt + (camera->port, GP_PORT_USB_ENDPOINT_OUT); + gp_port_usb_clear_halt + (camera->port, GP_PORT_USB_ENDPOINT_INT); + } + /* FIXME: free all camera->pl->params.objectinfo[] and other malloced data */ Index: ChangeLog =================================================================== RCS file: /cvsroot/gphoto/libgphoto2/camlibs/ptp2/ChangeLog,v retrieving revision 1.83 retrieving revision 1.84 diff -u -d -r1.83 -r1.84 --- ChangeLog 23 Jun 2004 02:04:21 -0000 1.83 +++ ChangeLog 16 Jul 2004 19:21:14 -0000 1.84 @@ -1,3 +1,5 @@ +2004-07-16 Mariusz Woloszyn + * ptp.h: Added NIKON extension code by Corey Manders 2004-06-23 Hubert Figuiere <hfi...@te...> * library.c: Added Kodak LS-473 |