IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19011


Ignore:
Timestamp:
Aug 11, 2008, 2:20:41 PM (18 years ago)
Author:
Paul Price
Message:

Call to readoutHaveMoreScans had parameters around the wrong way.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPARead.c

    r18830 r19011  
    4646// Return pointer to appropriate value for tracking scans
    4747static int readoutGetThisScan(pmReadout *readout, // Readout of interest
    48                               fpaReadType type // Type of image
     48                              fpaReadType type // Type of image
    4949    )
    5050{
     
    6363// Return pointer to appropriate value for tracking scans
    6464static int readoutSetLastScan(pmReadout *readout, // Readout of interest
    65                               fpaReadType type,   // Type of image
    66                               int numScans        // requested number of scans
     65                              fpaReadType type,   // Type of image
     66                              int numScans        // requested number of scans
    6767    )
    6868{
     
    7070      case FPA_READ_TYPE_IMAGE:
    7171        readout->lastImageScan = readout->thisImageScan + numScans;
    72         return readout->lastImageScan;
     72        return readout->lastImageScan;
    7373      case FPA_READ_TYPE_MASK:
    7474        readout->lastMaskScan = readout->thisMaskScan + numScans;
    75         return readout->lastMaskScan;
     75        return readout->lastMaskScan;
    7676      case FPA_READ_TYPE_WEIGHT:
    7777        readout->lastWeightScan = readout->thisWeightScan + numScans;
    78         return readout->lastWeightScan;
     78        return readout->lastWeightScan;
    7979      default:
    8080        psAbort("Unknown read type: %x\n", type);
     
    159159// beyond the end?  Requires that cellNumReadouts() has been called before (for header and
    160160// concepts to have been read) In the process, adjusts the TRIMSEC
    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     )
     161static 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                                 )
    167167{
    168168    assert(result);
     
    215215    // Calculate the segment offset and upper limit
    216216    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)
    219219        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    }
    224224
    225225    // allow multiple threads to read different segments into different readouts
     
    249249
    250250    // 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,
    252252    // even if all readouts lack the image pointer.
    253253    if (!image) {
    254254        return true;
    255     } 
     255    }
    256256
    257257    // If we have already read an image, this result implies we are done (no more to read)
     
    459459
    460460    bool haveData;
    461     if (!readoutHaveMoreScans (&haveData, readout, type, numScans, config)) {
     461    if (!readoutHaveMoreScans(&haveData, readout, numScans, type, config)) {
    462462        psError(PS_ERR_UNKNOWN, false, "Unable to determine readout properties.");
    463463        return false;
Note: See TracChangeset for help on using the changeset viewer.