Changeset 15087
- Timestamp:
- Sep 28, 2007, 2:06:47 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/camera/pmFPAConstruct.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPAConstruct.c
r15068 r15087 701 701 pmChip *chip, // Known chip to which to add, or NULL 702 702 const psMetadata *format, // The camera format 703 pmHDU *phdu // The Primary HDU 703 pmHDU *phdu, // The Primary HDU 704 bool install // Install the HDUs? 704 705 ) 705 706 { … … 746 747 } 747 748 749 if (!install) { 750 // Everything below is about installing the HDUs 751 psFree(chipType); 752 return true; 753 } 754 748 755 if (!addHDUtoChip(chip, phdu)) { 749 756 psError(PS_ERR_UNKNOWN, false, "Unable to add HDU to chip\n"); … … 803 810 pmChip *chip, // Known chip to which to add, or NULL 804 811 const psMetadata *format, // The camera format 805 pmHDU *phdu // Primary HDU 812 pmHDU *phdu, // Primary HDU 813 bool install // Install the HDUs? 806 814 ) 807 815 { … … 845 853 } 846 854 855 if (!install) { 856 // Everything below is about installing the HDU 857 psFree(chipType); 858 return true; 859 } 860 847 861 if (!addHDUtoChip(chip, phdu)) { 848 862 psError(PS_ERR_UNKNOWN, false, "Unable to add HDU to chip\n"); … … 879 893 pmCell *cell, // Known cell to which to add, or NULL 880 894 const psMetadata *format, // The camera format 881 pmHDU *phdu // The Primary HDU 895 pmHDU *phdu, // The Primary HDU 896 bool install // Install the HDUs? 882 897 ) 883 898 { … … 1029 1044 psFree(cellNames); 1030 1045 psFree(cellTypes); 1046 } 1047 1048 if (!install) { 1049 // Everything below is about installing the HDU 1050 psFree(chipNames); 1051 psFree(cellNames); 1052 psFree(cellTypes); 1053 return true; 1031 1054 } 1032 1055 … … 1201 1224 switch (extLevel) { 1202 1225 case PM_FPA_LEVEL_CELL: 1203 if (install) { 1204 phdu->blankPHU = true; 1205 if (!addSource_CHIP_CELL(view, fpa, chip, format, phdu)) { 1206 psError(PS_ERR_UNKNOWN, false, "Unable to add source."); 1207 psFree(phdu); 1208 psFree(view); 1209 return NULL; 1210 } 1226 phdu->blankPHU = true; 1227 if (!addSource_CHIP_CELL(view, fpa, chip, format, phdu, install)) { 1228 psError(PS_ERR_UNKNOWN, false, "Unable to add source."); 1229 psFree(phdu); 1230 psFree(view); 1231 return NULL; 1211 1232 } 1212 1233 psFree(phdu); 1213 1234 return view; 1214 1235 case PM_FPA_LEVEL_NONE: 1215 if (install) { 1216 phdu->blankPHU = false; 1217 if (!addSource_CHIP_NONE(view, fpa, chip, format, phdu)) { 1218 psError(PS_ERR_UNKNOWN, false, "Unable to add source."); 1219 psFree(phdu); 1220 psFree(view); 1221 return NULL; 1222 } 1236 phdu->blankPHU = false; 1237 if (!addSource_CHIP_NONE(view, fpa, chip, format, phdu, install)) { 1238 psError(PS_ERR_UNKNOWN, false, "Unable to add source."); 1239 psFree(phdu); 1240 psFree(view); 1241 return NULL; 1223 1242 } 1224 1243 psFree(phdu); … … 1243 1262 cell = chip->cells->data[phuView->cell]; 1244 1263 } 1245 if (install) { 1246 phdu->blankPHU = false; 1247 if (!addSource_CELL_NONE(view, fpa, cell, format, phdu)) { 1248 psError(PS_ERR_UNKNOWN, false, "Unable to add source."); 1249 psFree(phdu); 1250 psFree(view); 1251 return NULL; 1252 } 1264 phdu->blankPHU = false; 1265 if (!addSource_CELL_NONE(view, fpa, cell, format, phdu, install)) { 1266 psError(PS_ERR_UNKNOWN, false, "Unable to add source."); 1267 psFree(phdu); 1268 psFree(view); 1269 return NULL; 1253 1270 } 1254 1271 psFree(phdu);
Note:
See TracChangeset
for help on using the changeset viewer.
