Changeset 19011
- Timestamp:
- Aug 11, 2008, 2:20:41 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/camera/pmFPARead.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPARead.c
r18830 r19011 46 46 // Return pointer to appropriate value for tracking scans 47 47 static int readoutGetThisScan(pmReadout *readout, // Readout of interest 48 fpaReadType type // Type of image48 fpaReadType type // Type of image 49 49 ) 50 50 { … … 63 63 // Return pointer to appropriate value for tracking scans 64 64 static int readoutSetLastScan(pmReadout *readout, // Readout of interest 65 fpaReadType type,// Type of image66 int numScans// requested number of scans65 fpaReadType type, // Type of image 66 int numScans // requested number of scans 67 67 ) 68 68 { … … 70 70 case FPA_READ_TYPE_IMAGE: 71 71 readout->lastImageScan = readout->thisImageScan + numScans; 72 return readout->lastImageScan;72 return readout->lastImageScan; 73 73 case FPA_READ_TYPE_MASK: 74 74 readout->lastMaskScan = readout->thisMaskScan + numScans; 75 return readout->lastMaskScan;75 return readout->lastMaskScan; 76 76 case FPA_READ_TYPE_WEIGHT: 77 77 readout->lastWeightScan = readout->thisWeightScan + numScans; 78 return readout->lastWeightScan;78 return readout->lastWeightScan; 79 79 default: 80 80 psAbort("Unknown read type: %x\n", type); … … 159 159 // beyond the end? Requires that cellNumReadouts() has been called before (for header and 160 160 // concepts to have been read) In the process, adjusts the TRIMSEC 161 static bool readoutHaveMoreScans(bool *result, // true : more data to read162 pmReadout *readout, // Readout of interest163 int numScans, // Number of scans to read at a time164 fpaReadType type, // Type of image165 pmConfig *config // Configuration166 )161 static bool readoutHaveMoreScans(bool *result, // true : more data to read 162 pmReadout *readout, // Readout of interest 163 int numScans, // Number of scans to read at a time 164 fpaReadType type, // Type of image 165 pmConfig *config // Configuration 166 ) 167 167 { 168 168 assert(result); … … 215 215 // Calculate the segment offset and upper limit 216 216 if (numScans == 0) { 217 // in the case of numScans == 0, we never call this funtion unless the data has not yet 218 // been read. thus, only if the delta is should we return false (ie, trimsec defines an empty region)217 // in the case of numScans == 0, we never call this funtion unless the data has not yet 218 // been read. thus, only if the delta is should we return false (ie, trimsec defines an empty region) 219 219 int thisScan = (readdir == 1) ? trimsec->y0 : trimsec->x0; 220 int lastScan = (readdir == 1) ? trimsec->y1 : trimsec->x1;221 *result = (lastScan > thisScan);222 return true;223 } 220 int lastScan = (readdir == 1) ? trimsec->y1 : trimsec->x1; 221 *result = (lastScan > thisScan); 222 return true; 223 } 224 224 225 225 // allow multiple threads to read different segments into different readouts … … 249 249 250 250 // XXX this may not be the valid test in a multithread environment. consider a fileGroup of 251 // N readouts, but numScans set to 0. only the first should report that it requires data, 251 // N readouts, but numScans set to 0. only the first should report that it requires data, 252 252 // even if all readouts lack the image pointer. 253 253 if (!image) { 254 254 return true; 255 } 255 } 256 256 257 257 // If we have already read an image, this result implies we are done (no more to read) … … 459 459 460 460 bool haveData; 461 if (!readoutHaveMoreScans (&haveData, readout, type, numScans, config)) {461 if (!readoutHaveMoreScans(&haveData, readout, numScans, type, config)) { 462 462 psError(PS_ERR_UNKNOWN, false, "Unable to determine readout properties."); 463 463 return false;
Note:
See TracChangeset
for help on using the changeset viewer.
