IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 11, 2007, 2:12:17 PM (19 years ago)
Author:
Paul Price
Message:

Removing CELL.X0 from the correct place!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/config/pmConfigCamera.c

    r15150 r15289  
    637637                psMetadata *contents = psMetadataAlloc(); // List of contents, with chipName:chipType
    638638
    639                 // XXX this is using the fpaItem->name not the chipName
     639                // XXX this is using the fpaItem->name not the chipName
    640640                psMetadataIterator *fpaIter = psMetadataIteratorAlloc(fpa, PS_LIST_HEAD, NULL); // Iteratr
    641641                psMetadataItem *fpaItem;    // Item from iteration
     
    690690                while ((contentItem = psMetadataGetAndIncrement(contentIter))) {
    691691                    assert (contentItem->type == PS_DATA_STRING);
    692                     char *ptr = strchr (contentItem->data.str, ':');
    693                     assert (ptr);
     692                    char *ptr = strchr (contentItem->data.str, ':');
     693                    assert (ptr);
    694694                    psString content = psStringNCopy (contentItem->data.str, ptr - contentItem->data.str);
    695695                    psStringAppend(&content, ":_mosaicChip ");
    696                     psFree (contentItem->data.str);
    697                     contentItem->data.str = content;               
     696                    psFree (contentItem->data.str);
     697                    contentItem->data.str = content;
    698698                }
    699699                psFree(contentIter);
    700700
    701                 # if (0)
     701                # if (0)
    702702                while (psListLength(contents->list) > 0) {
    703703                    psMetadataRemoveIndex(contents, PS_LIST_TAIL);
     
    715715                }
    716716                psFree(fpaIter);
    717                 # endif
     717                # endif
    718718
    719719                psMetadata *chips = psMetadataAlloc(); // List of chip types, with cellName:cellType
     
    763763        removeCellConceptsSources(defaults);
    764764
     765        psMetadata *conceptFormats = psMetadataLookupMetadata(&mdok, format, "FORMATS"); // Concepts formats
     766
    765767        // Add in the positioning concepts
    766768        psMetadataAddS32(defaults, PS_LIST_TAIL, "CELL.XPARITY", 0, NULL, 1);
     
    768770        psMetadataAddS32(defaults, PS_LIST_TAIL, "CELL.X0",      0, NULL, 0);
    769771        psMetadataAddS32(defaults, PS_LIST_TAIL, "CELL.Y0",      0, NULL, 0);
    770         if (formats) {
    771             if (psMetadataLookup(formats, "CELL.X0")) {
    772                 psMetadataRemoveKey(formats, "CELL.X0");
    773             }
    774             if (psMetadataLookup(formats, "CELL.Y0")) {
    775                 psMetadataRemoveKey(formats, "CELL.Y0");
     772        if (conceptFormats) {
     773            if (psMetadataLookup(conceptFormats, "CELL.X0")) {
     774                psMetadataRemoveKey(conceptFormats, "CELL.X0");
     775            }
     776            if (psMetadataLookup(conceptFormats, "CELL.Y0")) {
     777                psMetadataRemoveKey(conceptFormats, "CELL.Y0");
    776778            }
    777779        }
     
    785787            psMetadataAddS32(defaults, PS_LIST_TAIL, "CHIP.X0", 0, NULL, 0);
    786788            psMetadataAddS32(defaults, PS_LIST_TAIL, "CHIP.Y0", 0, NULL, 0);
    787             if (formats) {
    788                 if (psMetadataLookup(formats, "CHIP.X0")) {
    789                     psMetadataRemoveKey(formats, "CHIP.X0");
     789            if (conceptFormats) {
     790                if (psMetadataLookup(conceptFormats, "CHIP.X0")) {
     791                    psMetadataRemoveKey(conceptFormats, "CHIP.X0");
    790792                }
    791                 if (psMetadataLookup(formats, "CHIP.Y0")) {
    792                     psMetadataRemoveKey(formats, "CHIP.Y0");
     793                if (psMetadataLookup(conceptFormats, "CHIP.Y0")) {
     794                    psMetadataRemoveKey(conceptFormats, "CHIP.Y0");
    793795                }
    794796            }
Note: See TracChangeset for help on using the changeset viewer.