Changeset 35561 for trunk/psModules/src/camera/pmFPAConstruct.c
- Timestamp:
- May 9, 2013, 12:24:53 PM (13 years ago)
- Location:
- trunk/psModules
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/camera/pmFPAConstruct.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules
- Property svn:mergeinfo changed
-
trunk/psModules/src/camera/pmFPAConstruct.c
r27989 r35561 110 110 assert(hdu); 111 111 112 // XXXX here is the issue : we need to avoid raising an error here 112 113 if (fpa->hdu) { 113 114 // Something's already here 114 115 if (fpa->hdu != hdu) { 115 psError(PS_ERR_IO, true, "Unable to add HDU since FPA already has one.\n"); 116 } 117 return false; 116 # define TEST1 1 117 # if (TEST1) 118 psError(PS_ERR_IO, true, "Unable to add HDU since FPA already has one.\n"); 119 # else 120 psWarning ("Unable to add HDU since FPA already has one.\n"); 121 # endif 122 } 123 # if (TEST1) 124 return false; 125 # else 126 return true; 127 # endif 118 128 } 119 129 fpa->hdu = psMemIncrRefCounter(hdu); … … 1154 1164 phdu->blankPHU = true; 1155 1165 if (install) { 1156 if (!addHDUtoFPA(fpa, phdu) || !addSource_FPA_CHIP(fpa, format) || 1157 !pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_PHU, 1158 true, NULL)) { 1166 if (!addHDUtoFPA(fpa, phdu)) { 1167 psError(PS_ERR_UNKNOWN, false, "Unable to add HDU to FPA."); 1168 psFree(phdu); 1169 psFree(view); 1170 return NULL; 1171 } 1172 if (!addSource_FPA_CHIP(fpa, format)) { 1159 1173 psError(PS_ERR_UNKNOWN, false, "Unable to add source."); 1160 1174 psFree(phdu); … … 1162 1176 return NULL; 1163 1177 } 1164 } 1178 if (!pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_PHU, true, NULL)) { 1179 psError(PS_ERR_UNKNOWN, false, "Unable to read concepts."); 1180 psFree(phdu); 1181 psFree(view); 1182 return NULL; 1183 } 1184 } 1165 1185 psFree(phdu); 1166 1186 return view; 1167 1187 case PM_FPA_LEVEL_CELL: 1188 phdu->blankPHU = true; 1168 1189 if (install) { 1169 phdu->blankPHU = true; 1170 if (!addHDUtoFPA(fpa, phdu) || !addSource_FPA_CELL(fpa, format) || 1171 !pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_PHU, 1172 true, NULL)) { 1190 if (!addHDUtoFPA(fpa, phdu)) { 1191 psError(PS_ERR_UNKNOWN, false, "Unable to add HDU to FPA."); 1192 psFree(phdu); 1193 psFree(view); 1194 return NULL; 1195 } 1196 if (!addSource_FPA_CELL(fpa, format)) { 1173 1197 psError(PS_ERR_UNKNOWN, false, "Unable to add source."); 1198 psFree(phdu); 1199 psFree(view); 1200 return NULL; 1201 } 1202 if (!pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_PHU, true, NULL)) { 1203 psError(PS_ERR_UNKNOWN, false, "Unable to read concepts."); 1174 1204 psFree(phdu); 1175 1205 psFree(view); … … 1180 1210 return view; 1181 1211 case PM_FPA_LEVEL_NONE: 1212 phdu->blankPHU = false; 1182 1213 if (install) { 1183 phdu->blankPHU = false; 1184 if (!addHDUtoFPA(fpa, phdu) || !addSource_FPA_NONE(fpa, format) || 1185 !pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_PHU, 1186 true, NULL)) { 1214 if (!addHDUtoFPA(fpa, phdu)) { 1215 psError(PS_ERR_UNKNOWN, false, "Unable to add HDU to FPA."); 1216 psFree(phdu); 1217 psFree(view); 1218 return NULL; 1219 } 1220 if (!addSource_FPA_NONE(fpa, format)) { 1187 1221 psError(PS_ERR_UNKNOWN, false, "Unable to add source."); 1222 psFree(phdu); 1223 psFree(view); 1224 return NULL; 1225 } 1226 if (!pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_PHU, true, NULL)) { 1227 psError(PS_ERR_UNKNOWN, false, "Unable to read concepts."); 1188 1228 psFree(phdu); 1189 1229 psFree(view);
Note:
See TracChangeset
for help on using the changeset viewer.
