Changeset 17489 for trunk/psModules/src/camera/pmFPAfileDefine.c
- Timestamp:
- Apr 28, 2008, 11:13:46 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/camera/pmFPAfileDefine.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPAfileDefine.c
r16611 r17489 172 172 } 173 173 174 psMetadata * data= pmConfigFileRule(config, camera, name); // File rule175 if (! data) {174 psMetadata *filerule = pmConfigFileRule(config, camera, name); // File rule 175 if (!filerule) { 176 176 psError(PS_ERR_IO, true, "Can't find file rule %s!", name); 177 177 return NULL; … … 183 183 file->name = psStringCopy(name); 184 184 185 file->filerule = psMemIncrRefCounter(psMetadataLookupStr(&status, data, "FILENAME.RULE")); 186 187 const char *type = psMetadataLookupStr(&status, data, "FILE.TYPE"); 185 // this is the filename rule 186 file->filerule = psMemIncrRefCounter(psMetadataLookupStr(&status, filerule, "FILENAME.RULE")); 187 188 const char *type = psMetadataLookupStr(&status, filerule, "FILE.TYPE"); 188 189 file->type = pmFPAfileTypeFromString(type); 189 190 if (file->type == PM_FPA_FILE_NONE) { … … 214 215 if (!formatName || strlen(formatName) == 0) { 215 216 // select the format list from the selected camera 216 formatName = psMetadataLookupStr(&status, data, "FILE.FORMAT");217 formatName = psMetadataLookupStr(&status, filerule, "FILE.FORMAT"); 217 218 if (!formatName || strcmp(formatName, "NONE") == 0) { 218 219 // Try to get by with the default … … 238 239 239 240 // Get FITS output scheme 240 const char *fitsType = psMetadataLookupStr(&status, data, "FITS.TYPE"); // Name of FITS scheme to use241 const char *fitsType = psMetadataLookupStr(&status, filerule, "FITS.TYPE"); // Name of FITS scheme to use 241 242 if (fitsType && strcasecmp(fitsType, "NONE") != 0) { 242 psMetadata *fitsTypes = psMetadataLookupMetadata(&status, camera, "FITS"); // The FITS schemes 243 if (!fitsTypes) { 244 psWarning("Unable to find FITS in camera configuration."); 245 goto FITS_OPTIONS_DONE; 246 } 247 psMetadata *scheme = psMetadataLookupMetadata(NULL, fitsTypes, fitsType); // FITS scheme 243 244 // load the FITSTYPE scheme for this file 245 psMetadata *scheme = pmConfigFitsType(config, camera, fitsType); // File rule 248 246 if (!scheme) { 247 // XXX change to a config error? 249 248 psWarning("Unable to find %s in FITS in camera configuration --- will use defaults.", fitsType); 250 249 goto FITS_OPTIONS_DONE; … … 337 336 } 338 337 339 file->dataLevel = pmFPALevelFromName(psMetadataLookupStr(&status, data, "DATA.LEVEL"));338 file->dataLevel = pmFPALevelFromName(psMetadataLookupStr(&status, filerule, "DATA.LEVEL")); 340 339 if (file->dataLevel == PM_FPA_LEVEL_NONE) { 341 340 psError(PS_ERR_IO, true, "DATA.LEVEL is not set for %s\n", name);
Note:
See TracChangeset
for help on using the changeset viewer.
