Changeset 25930 for trunk/psModules/src/concepts/pmConceptsStandard.c
- Timestamp:
- Oct 22, 2009, 4:54:27 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/concepts/pmConceptsStandard.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/concepts/pmConceptsStandard.c
r25882 r25930 753 753 psError(PS_ERR_BAD_PARAMETER_TYPE, true, "Type for %s (%x) is not BOOL\n", 754 754 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 } 756 768 } 757 769 … … 765 777 return psMetadataItemAllocS32(concept->name, concept->comment, bt_status); 766 778 } 779 psMetadataItem *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 767 807 768 808 // Get the current value of a concept
Note:
See TracChangeset
for help on using the changeset viewer.
