IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 27, 2007, 6:02:32 PM (19 years ago)
Author:
Paul Price
Message:

Update the appropriate source --- if the header is a PHU, that's what should be updated, not "HEADER", but "PHU".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPAConstruct.c

    r12564 r12620  
    139139    }
    140140    fpa->hdu = psMemIncrRefCounter(hdu);
    141     bool success = true;                // Success of reading concepts
    142     if (hdu->header && !pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_HEADER,
    143                                           false, NULL)) {
    144         psError(PS_ERR_UNKNOWN, false, "Unable to read concepts from header.\n");
    145         success = false;
    146     }
    147141    pmFPASetFileStatus(fpa, true);
    148142
    149     return success;
     143    pmConceptSource source = 0;         // Source for concepts
     144    if (hdu->header) {
     145        if (hdu->blankPHU) {
     146            source = PM_CONCEPT_SOURCE_PHU;
     147        } else {
     148            source = PM_CONCEPT_SOURCE_HEADER;
     149        }
     150    }
     151    source |= PM_CONCEPT_SOURCE_DEFAULTS;
     152
     153    return pmConceptsReadFPA(fpa, source, false, NULL);
    150154}
    151155
     
    166170    }
    167171    chip->hdu = psMemIncrRefCounter(hdu);
    168     bool success = true;                // Success of reading concepts
    169     if (hdu->header && !pmConceptsReadChip(chip, PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_HEADER,
    170                                            true, false, NULL)) {
    171         psError(PS_ERR_UNKNOWN, false, "Unable to read concepts from header.\n");
    172         success = false;
    173     }
    174172    pmChipSetFileStatus(chip, true);
    175 
    176     return success;
     173    pmConceptSource source = 0;         // Source for concepts
     174    if (hdu->header) {
     175        if (hdu->blankPHU) {
     176            source = PM_CONCEPT_SOURCE_PHU;
     177        } else {
     178            source = PM_CONCEPT_SOURCE_HEADER;
     179        }
     180    }
     181    source |= PM_CONCEPT_SOURCE_DEFAULTS;
     182    return pmConceptsReadChip(chip, source, true, false, NULL);
    177183}
    178184
     
    193199    }
    194200    cell->hdu = psMemIncrRefCounter(hdu);
    195     bool success = true;                // Success of reading concepts
    196     if (hdu->header && !pmConceptsReadCell(cell, PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_HEADER,
    197                                            true, NULL)) {
    198         psError(PS_ERR_UNKNOWN, false, "Unable to read concepts from header.\n");
    199         success = false;
    200     }
    201201    pmCellSetFileStatus(cell, true);
    202 
    203     return success;
     202    pmConceptSource source = 0;         // Source for concepts
     203    if (hdu->header) {
     204        if (hdu->blankPHU) {
     205            source = PM_CONCEPT_SOURCE_PHU;
     206        } else {
     207            source = PM_CONCEPT_SOURCE_HEADER;
     208        }
     209    }
     210    source |= PM_CONCEPT_SOURCE_DEFAULTS;
     211    return pmConceptsReadCell(cell, source, true, NULL);
    204212}
    205213
     
    12051213    psFree(fpaname);
    12061214
     1215    if (!pm
     1216
    12071217    return view;
    12081218}
Note: See TracChangeset for help on using the changeset viewer.