IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 22, 2009, 4:54:27 PM (17 years ago)
Author:
watersc1
Message:

Updated fringe fitting code.

Corrected Bool->S32 bug for BTOOLAPP header concept.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/concepts/pmConceptsStandard.c

    r25882 r25930  
    753753    psError(PS_ERR_BAD_PARAMETER_TYPE, true, "Type for %s (%x) is not BOOL\n",
    754754            concept->name, concept->type);
    755     return NULL;
     755    if (concept->type != PS_DATA_S32) {
     756      psError(PS_ERR_BAD_PARAMETER_TYPE, true, "Wasn't the type I'd guessed either.\n");
     757      return NULL;
     758    }
     759    psError(PS_ERR_BAD_PARAMETER_TYPE, true, "Looks like an S32 value? (%d)\n",
     760            concept->data.S32);
     761
     762    if (concept->data.S32 == 0) {
     763      bt_status = 1;
     764    }
     765    else if (concept->data.S32 == 1) {
     766      bt_status = -2;
     767    }
    756768  }
    757769
     
    765777  return psMetadataItemAllocS32(concept->name, concept->comment, bt_status);
    766778
     779psMetadataItem *p_pmConceptFormat_BTOOLAPP(const psMetadataItem *concept,
     780                                           pmConceptSource source,
     781                                           const psMetadata *cameraFormat,
     782                                           const pmFPA *fpa,
     783                                           const pmChip *chip,
     784                                           const pmCell *cell)
     785{
     786  assert(concept);
     787
     788  if (concept->type != PS_DATA_S32) {
     789    return NULL;
     790  }
     791
     792  if (concept->data.S32 == 0) {
     793    return NULL;
     794  }
     795  else if (concept->data.S32 == -2) {
     796    return psMetadataItemAllocBool(concept->name,concept->comment,true);
     797  }
     798  else if (concept->data.S32 == 1) {
     799    return psMetadataItemAllocBool(concept->name,concept->comment,false);
     800  }
     801  else {
     802    return NULL;
     803  }
     804
     805
     806
    767807
    768808// Get the current value of a concept
Note: See TracChangeset for help on using the changeset viewer.