- Timestamp:
- May 3, 2010, 8:50:52 AM (16 years ago)
- Location:
- branches/simtest_nebulous_branches
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/simtest_nebulous_branches
- Property svn:mergeinfo changed
-
branches/simtest_nebulous_branches/psModules
-
Property svn:mergeinfo
set to (toggle deleted branches)
/trunk/psModules merged eligible /branches/eam_branches/stackphot.20100406/psModules 27623-27653 /branches/pap_delete/psModules 27530-27595
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
branches/simtest_nebulous_branches/psModules/src/config/pmConfigCamera.c
r23452 r27840 149 149 camerasIter = psMetadataIteratorAlloc(new, PS_LIST_HEAD, NULL); // Iterator 150 150 while ((camerasItem = psMetadataGetAndIncrement(camerasIter))) { 151 psMetadataAddItem(cameras, camerasItem, PS_LIST_HEAD, 0);151 psMetadataAddItem(cameras, camerasItem, PS_LIST_HEAD, PS_META_REPLACE); 152 152 } 153 153 psFree(camerasIter); … … 210 210 211 211 // See if the new one is already there 212 psString newName = NULL; // Name of skycelled camera 213 psStringAppend(&newName, "_%s-SKYCELL", name); 214 if (psMetadataLookup(oldCameras, newName)) { 212 psString newName = pmConfigCameraSkycellName(name); // Name of skycelled camera 213 bool mdok; // Status of MD lookup 214 psMetadata *oldCam = psMetadataLookupMetadata(&mdok, oldCameras, newName); // Existing camera configuration 215 if (mdok && oldCam) { 216 // Ensure new camera goes to the head of the metadata, so that it will be recognised first 217 // The old camera doesn't contain the PSMOSAIC header, so it will match anything! 218 psTrace("psModules.config", 6, "Camera configuration for %s exists, so moving to the front.", newName); 219 psMetadataAddMetadata(newCameras, PS_LIST_HEAD, newName, PS_META_REPLACE, NULL, oldCam); 215 220 psFree(newName); 216 221 return true; … … 366 371 // New camera MUST go to the head of the metadata, so that it will be recognised first 367 372 // The old camera doesn't contain the PSCAMERA and PSFORMAT headers, so it will match anything! 373 psTrace("psModules.config", 6, "Generated new camera configuration for %s.", newName); 368 374 psMetadataAddMetadata(newCameras, PS_LIST_HEAD, newName, PS_META_REPLACE, 369 375 "Automatically generated", new); … … 436 442 camerasIter = psMetadataIteratorAlloc(new, PS_LIST_HEAD, NULL); // Iterator 437 443 while ((camerasItem = psMetadataGetAndIncrement(camerasIter))) { 438 psMetadataAddItem(cameras, camerasItem, PS_LIST_HEAD, 0);444 psMetadataAddItem(cameras, camerasItem, PS_LIST_HEAD, PS_META_REPLACE); 439 445 } 440 446 psFree(camerasIter); … … 469 475 470 476 // See if the new one is already there 471 psString newName = NULL; // Name of mosaicked camera 472 psStringAppend(&newName, "_%s-%s", name, mosaicLevel == PM_FPA_LEVEL_CHIP ? "CHIP" : "FPA"); 473 if (psMetadataLookup(oldCameras, newName)) { 477 psString newName = mosaicLevel == PM_FPA_LEVEL_CHIP ? pmConfigCameraChipName(name) : 478 pmConfigCameraFPAName(name); // Name of mosaicked camera 479 bool mdok; // Status of MD lookup 480 psMetadata *oldCam = psMetadataLookupMetadata(&mdok, oldCameras, newName); // Existing camera configuration 481 if (mdok && oldCam) { 482 // Ensure new camera goes to the head of the metadata, so that it will be recognised first 483 // The old camera doesn't contain the PSMOSAIC header, so it will match anything! 484 psTrace("psModules.config", 6, "Camera configuration for %s exists, so moving to the front.", newName); 485 psMetadataAddMetadata(newCameras, PS_LIST_HEAD, newName, PS_META_REPLACE, NULL, oldCam); 474 486 psFree(newName); 475 487 return true; … … 477 489 478 490 psMetadata *new = psMetadataCopy(NULL, camera); // Copy of the camera description 479 bool mdok; // Status of MD lookups480 491 481 492 // ** Fix up the contents of the FPA description to match the mosaicked camera ** … … 849 860 // New camera MUST go to the head of the metadata, so that it will be recognised first 850 861 // The old camera doesn't contain the PSMOSAIC header, so it will match anything! 862 psTrace("psModules.config", 6, "Generated new camera configuration for %s.", newName); 851 863 psMetadataAddMetadata(newCameras, PS_LIST_HEAD, newName, PS_META_REPLACE, 852 864 "Automatically generated", new);
Note:
See TracChangeset
for help on using the changeset viewer.
