Changeset 1113
- Timestamp:
- 03/27/11 04:49:37 (2 years ago)
- File:
-
- 1 edited
-
trunk/platform/generic/wrappers.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/platform/generic/wrappers.c
r1106 r1113 142 142 newpt = zoom_points-1; 143 143 } 144 #if defined(CAMERA_sx30) 145 // SX30 - Can't find zoom_status, _MoveZoomLensWithPoint crashes camera 146 // _PT_MoveOpticalZoomAt works, and updates PROPCASE_OPTICAL_ZOOM_POSITION; but doesn't wait for zoom to finish 147 extern void _PT_MoveOpticalZoomAt(long*); 144 145 #if defined(CAMERA_sx30) || defined(CAMERA_g12) 148 146 if (lens_get_zoom_point() != newpt) 149 147 { 148 // Get current digital zoom mode & state 149 // state == 1 && mode == 0 --> Digital Zoom Standard 150 int digizoom_mode, digizoom_state, digizoom_pos; 151 get_property_case(PROPCASE_DIGITAL_ZOOM_MODE,&digizoom_mode,sizeof(digizoom_mode)); 152 get_property_case(PROPCASE_DIGITAL_ZOOM_STATE,&digizoom_state,sizeof(digizoom_state)); 153 get_property_case(PROPCASE_DIGITAL_ZOOM_POSITION,&digizoom_pos,sizeof(digizoom_pos)); 154 if ((digizoom_state == 1) && (digizoom_mode == 0) && (digizoom_pos != 0)) 155 { 156 // reset digital zoom in case camera is in this zoom range 157 extern void _PT_MoveDigitalZoomToWide(); 158 _PT_MoveDigitalZoomToWide(); 159 } 160 161 #if defined(CAMERA_sx30) 162 // SX30 - _MoveZoomLensWithPoint crashes camera 163 // _PT_MoveOpticalZoomAt works, and updates PROPCASE_OPTICAL_ZOOM_POSITION; but doesn't wait for zoom to finish 164 extern void _PT_MoveOpticalZoomAt(long*); 150 165 _PT_MoveOpticalZoomAt(&newpt); 166 #else 167 _MoveZoomLensWithPoint((short*)&newpt); 168 #endif 169 170 // have to sleep here, zoom_busy set in another task, without sleep this will hang 151 171 while (zoom_busy) msleep(10); 172 173 // g12 & sx30 only use this value for optical zoom 174 zoom_status=ZOOM_OPTICAL_MAX; 175 176 #if defined(CAMERA_g12) 177 _SetPropertyCase(PROPCASE_OPTICAL_ZOOM_POSITION, &newpt, sizeof(newpt)); 178 #endif 152 179 } 153 #elif defined(CAMERA_g12) 154 // G12 - Can't find zoom_status, _MoveZoomLensWithPoint works anyway; but doesn't wait for zoom to finish 155 if (lens_get_zoom_point() != newpt) 156 { 157 _MoveZoomLensWithPoint((short*)&newpt); 158 while (zoom_busy) msleep(10); 159 _SetPropertyCase(PROPCASE_OPTICAL_ZOOM_POSITION, &newpt, sizeof(newpt)); 160 } 161 #else // !CAMERA_g12 180 #else // !(CAMERA_g12 || CAMERA_sx30) 162 181 _MoveZoomLensWithPoint((short*)&newpt); 163 182 164 #if defined (CAMERA_s95)183 #if defined (CAMERA_s95) 165 184 // this will hang sometimes on s95 when zoom_busy gets stuck as a 1 166 185 // we add a timeout as a work-around for this problem … … 170 189 break; 171 190 } 172 #else // !CAMERA_s95191 #else // !CAMERA_s95 173 192 while (zoom_busy) ; 174 #endif //CAMERA_s95193 #endif // !CAMERA_s95 175 194 176 195 if (newpt==0) zoom_status=ZOOM_OPTICAL_MIN; … … 178 197 else zoom_status=ZOOM_OPTICAL_MEDIUM; 179 198 _SetPropertyCase(PROPCASE_OPTICAL_ZOOM_POSITION, &newpt, sizeof(newpt)); 180 #endif // CAMERA_g12199 #endif // !(CAMERA_g12 || CAMERA_sx30) 181 200 } 182 201
Note: See TracChangeset
for help on using the changeset viewer.