IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 28, 2007, 4:02:36 PM (19 years ago)
Author:
Paul Price
Message:

I believe that HDUs should be added to the FPA hierarchy *before* the
concepts are read. This is because some concepts depend on the values
in cell->config, which is set in processContents. If the concept read
is performed after the PHU is placed, then the cell->config won't be
set and the concept won't be found.

File:
1 edited

Legend:

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

    r12642 r12660  
    141141    pmFPASetFileStatus(fpa, true);
    142142
    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, true, NULL);
     143    return true;
    154144}
    155145
     
    171161    chip->hdu = psMemIncrRefCounter(hdu);
    172162    pmChipSetFileStatus(chip, true);
    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, true, NULL);
     163
     164    return true;
    183165}
    184166
     
    200182    cell->hdu = psMemIncrRefCounter(hdu);
    201183    pmCellSetFileStatus(cell, true);
    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);
     184
     185    return true;
    212186}
    213187
     
    1008982              phdu->blankPHU = true;
    1009983              if (install) {
    1010                   if (!addHDUtoFPA(fpa, phdu) || !addSource_FPA_CHIP(fpa, format)) {
     984                  if (!addHDUtoFPA(fpa, phdu) || !addSource_FPA_CHIP(fpa, format) ||
     985                      !pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_PHU,
     986                                         true, NULL)) {
    1011987                      psError(PS_ERR_UNKNOWN, false, "Unable to add source.");
    1012988                      psFree(phdu);
     
    1020996              if (install) {
    1021997                  phdu->blankPHU = true;
    1022                   if (!addHDUtoFPA(fpa, phdu) || !addSource_FPA_CELL(fpa, format)) {
     998                  if (!addHDUtoFPA(fpa, phdu) || !addSource_FPA_CELL(fpa, format) ||
     999                      !pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_PHU,
     1000                                         true, NULL)) {
    10231001                      psError(PS_ERR_UNKNOWN, false, "Unable to add source.");
    10241002                      psFree(phdu);
     
    10321010              if (install) {
    10331011                  phdu->blankPHU = false;
    1034                   if (!addHDUtoFPA(fpa, phdu) || !addSource_FPA_NONE(fpa, format)) {
     1012                  if (!addHDUtoFPA(fpa, phdu) || !addSource_FPA_NONE(fpa, format) ||
     1013                      !pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_PHU,
     1014                                         true, NULL)) {
    10351015                      psError(PS_ERR_UNKNOWN, false, "Unable to add source.");
    10361016                      psFree(phdu);
     
    10631043              if (install) {
    10641044                  phdu->blankPHU = true;
    1065                   if (!addHDUtoChip(chip, phdu) || !addSource_CHIP_CELL(chip, format)) {
     1045                  if (!addHDUtoChip(chip, phdu) || !addSource_CHIP_CELL(chip, format) ||
     1046                      !pmConceptsReadChip(chip, PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_PHU,
     1047                                          true, true, NULL)) {
    10661048                      psError(PS_ERR_UNKNOWN, false, "Unable to add source.");
    10671049                      psFree(phdu);
     
    10751057              if (install) {
    10761058                  phdu->blankPHU = false;
    1077                   if (!addHDUtoChip(chip, phdu) || !addSource_CHIP_NONE(chip, format)) {
     1059                  if (!addHDUtoChip(chip, phdu) || !addSource_CHIP_NONE(chip, format) ||
     1060                      !pmConceptsReadChip(chip, PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_PHU,
     1061                                          true, true, NULL)) {
    10781062                      psError(PS_ERR_UNKNOWN, false, "Unable to add source.");
    10791063                      psFree(phdu);
     
    11131097          if (install) {
    11141098              phdu->blankPHU = false;
    1115               if (!addHDUtoCell(cell, phdu) || !addSource_CELL_NONE(cell, format)) {
     1099              if (!addHDUtoCell(cell, phdu) || !addSource_CELL_NONE(cell, format) ||
     1100                  !pmConceptsReadCell(cell, PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_PHU,
     1101                                      true, NULL)) {
    11161102                  psError(PS_ERR_UNKNOWN, false, "Unable to add source.");
    11171103                  psFree(phdu);
Note: See TracChangeset for help on using the changeset viewer.