IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 20, 2006, 11:47:20 AM (21 years ago)
Author:
jhoblitt
Message:

table field updates
more cleanups

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/p2rawToPending.c

    r6083 r6086  
    22
    33// select pending frames (exposure+images) which are done/not done
    4 psArray *p2rawToPending (p2Config *config, psArray *rawFrames) {
     4psArray *p2rawToPending(p2Config *config, psArray *rawFrames) {
    55
    66    psArray *pendingFrames = psArrayAlloc(rawFrames->n);
     
    88
    99    for (int i = 0; i < rawFrames->n; i++) {
    10         ppRawFrame *rawFrame = rawFrames->data[i];
     10        ppRawFrame *rawFrame = rawFrames->data[i];
    1111
    12         p2PendingExpRow *pendingExposure = p2PendingExpRowAlloc(
    13             rawFrame->exposure->exp_id,
    14             rawFrame->exposure->class,
    15             rawFrame->exposure->nclass,
    16             0xff,   // p1
    17             0xff    // p2
    18     );
    19 
    20         psArray *pendingImages = psArrayAlloc (rawFrame->images->n);
    21         pendingImages->n = 0;
    22         for (int j = 0; j < rawFrame->images->n; j++) {
    23             rawImfileRow *rawImage = rawFrame->images->data[j];
    24             p2PendingImfileRow *pendingImage = p2PendingImfileRowAlloc(
    25                 rawImage->exp_id,
    26                 rawImage->class,
    27                 rawImage->class_id,
    28                 0xff,   // p1
    29                 0xff,   // p2
    30             "",     // recipe
    31             "",     // stats
    32                 rawImage->url
     12        p2PendingExpRow *pendingExposure = p2PendingExpRowAlloc(
     13            rawFrame->exposure->exp_id,
     14            rawFrame->exposure->camera,
     15            rawFrame->exposure->filter,
     16            rawFrame->exposure->class,
     17            rawFrame->exposure->nclass,
     18            0xff,   // p1
     19            0xff    // p2
    3320        );
    3421
    35             psArrayAdd (pendingImages, 100, pendingImage);
    36         }
    37        
    38         p2PendingFrame *pendingFrame = p2PendingFrameAlloc (pendingExposure, pendingImages);
    39         psArrayAdd (pendingFrames, 100, pendingFrame);
     22        psArray *pendingImages = psArrayAlloc(rawFrame->images->n);
     23        pendingImages->n = 0;
     24        for (int j = 0; j < rawFrame->images->n; j++) {
     25            rawImfileRow *rawImage = rawFrame->images->data[j];
     26            p2PendingImfileRow *pendingImage = p2PendingImfileRowAlloc(
     27                rawImage->exp_id,
     28                rawImage->exptype,
     29                rawImage->class,
     30                rawImage->class_id,
     31                0xff,   // p1
     32                0xff,   // p2
     33                "",     // recipe
     34                "",     // stats
     35                rawImage->url
     36            );
     37
     38            psArrayAdd(pendingImages, 100, pendingImage);
     39        }
     40
     41        p2PendingFrame *pendingFrame = p2PendingFrameAlloc(pendingExposure,
     42            pendingImages);
     43        psArrayAdd(pendingFrames, 100, pendingFrame);
    4044    }
     45
    4146    return pendingFrames;
    42 } 
     47}
    4348
    4449// XXX the filename layout is defined by this code
Note: See TracChangeset for help on using the changeset viewer.