Changeset 14477 for trunk/psModules/src/config/pmConfigCamera.c
- Timestamp:
- Aug 13, 2007, 3:42:04 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/config/pmConfigCamera.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/config/pmConfigCamera.c
r14475 r14477 91 91 const static char *skycellConceptsFPA[] = { "FPA.EXPOSURE", "FPA.TIME", 0 }; 92 92 93 // Do we update a particular concept for a skycell? 94 static bool updateConcept(const char *name, // Name of concept 95 const char **concepts // List of concepts NOT to update 96 ) 93 // What do we call the skycell concept in the FITS header? 94 static const char *skycellConceptName(const char *name, // Name of concept 95 const char **concepts, // List of concepts NOT to update 96 const psMetadata *site // Site configuration 97 ) 97 98 { 98 99 for (int i = 0; concepts[i]; i++) { 99 100 if (strcmp(name, concepts[i]) == 0) { 100 return false; 101 } 102 } 103 return true; 104 } 105 106 // What do we call the skycell concept in the FITS header? 107 static const char* skycellConceptName(const char *name, // Name of concept 108 const psMetadata *site // Site configuration 109 ) 110 { 101 return NULL; 102 } 103 } 104 111 105 if (!site) { 112 106 return name; … … 224 218 iter = psListIteratorAlloc(concepts, PS_LIST_HEAD, false); 225 219 while ((name = psListGetAndIncrement(iter))) { 226 psMetadataAddStr(translation, PS_LIST_TAIL, name, 0, NULL, name);227 if ( updateConcept(name, skycellConceptsFPA)) {228 psMetadataAddStr(translation, PS_LIST_TAIL, name, 0, NULL, skycellConceptName(name, site));220 const char *new = skycellConceptName(name, skycellConceptsFPA, site); // Name for skycell 221 if (new) { 222 psMetadataAddStr(translation, PS_LIST_TAIL, name, 0, NULL, new); 229 223 } 230 224 } … … 235 229 iter = psListIteratorAlloc(concepts, PS_LIST_HEAD, false); 236 230 while ((name = psListGetAndIncrement(iter))) { 237 if (updateConcept(name, skycellConceptsChip)) { 238 psMetadataAddStr(translation, PS_LIST_TAIL, name, 0, NULL, skycellConceptName(name, site)); 231 const char *new = skycellConceptName(name, skycellConceptsChip, site); // Name for skycell 232 if (new) { 233 psMetadataAddStr(translation, PS_LIST_TAIL, name, 0, NULL, new); 239 234 } 240 235 } … … 245 240 iter = psListIteratorAlloc(concepts, PS_LIST_HEAD, false); 246 241 while ((name = psListGetAndIncrement(iter))) { 247 if (updateConcept(name, skycellConceptsCell)) { 248 psMetadataAddStr(translation, PS_LIST_TAIL, name, 0, NULL, skycellConceptName(name, site)); 242 const char *new = skycellConceptName(name, skycellConceptsCell, site); // Name for skycell 243 if (new) { 244 psMetadataAddStr(translation, PS_LIST_TAIL, name, 0, NULL, new); 249 245 } 250 246 }
Note:
See TracChangeset
for help on using the changeset viewer.
