Changeset 15183 for trunk/psModules/src/camera/pmFPAfileDefine.c
- Timestamp:
- Oct 3, 2007, 11:53:54 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/camera/pmFPAfileDefine.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPAfileDefine.c
r15180 r15183 222 222 file->save = false; 223 223 224 // Use the camera we were told to, the camera of the provided FPA, or default to the default camera225 psMetadata *camera; // Camera configuration226 if (!cameraName || strlen(cameraName) == 0) {227 if (fpa && fpa->camera) {228 camera = (psMetadata*)fpa->camera; // Casting away const, so I can put it in the file229 } else {230 camera = config->camera;231 cameraName = config->cameraName;232 }233 } else {234 bool mdok; // Status of MD lookup235 psMetadata *cameras = psMetadataLookupMetadata(&mdok, config->site, "CAMERAS"); // Known cameras236 if (!mdok || !cameras) {237 psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find CAMERAS in the site configuration.\n");238 return NULL;239 }240 camera = psMetadataLookupMetadata(&mdok, cameras, cameraName); // Camera configuration of interest241 if (!mdok || !camera) {242 psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find automatically generated "243 "camera configuration %s in site configuration.\n", cameraName);244 return NULL;245 }246 247 if (fpa && fpa->camera && fpa->camera != camera) {248 psAbort("Camera of bound FPA is not the requested camera --- there is an inconsistency!");249 }250 }251 224 file->camera = psMemIncrRefCounter(camera); 252 225 file->cameraName = psMemIncrRefCounter(cameraName);
Note:
See TracChangeset
for help on using the changeset viewer.
