IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 10, 2008, 3:29:20 PM (18 years ago)
Author:
Paul Price
Message:

Using new function.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack/src/ppStackCamera.c

    r16862 r16913  
    252252    output->save = true;
    253253
    254     // Generate the correct structure
    255     pmFPALevel phuLevel = pmFPAPHULevel(output->format); // Level at which PHU goes
    256     pmFPAview *view = pmFPAviewAlloc(0);// View for current level
    257     if (phuLevel == PM_FPA_LEVEL_FPA) {
    258         if (!pmFPAAddSourceFromView(fpa, "Stack", view, output->format)) {
    259             psError(PS_ERR_UNKNOWN, false, "Unable to add PHU to FPA.");
    260             psFree(fpa);
    261             psFree(view);
    262             return NULL;
    263         }
    264     } else {
    265         pmChip *chip;                       // Chip from FPA
    266         while ((chip = pmFPAviewNextChip(view, fpa, 1))) {
    267             if (phuLevel == PM_FPA_LEVEL_CHIP) {
    268                 if (!pmFPAAddSourceFromView(fpa, "Stack", view, output->format)) {
    269                     psError(PS_ERR_UNKNOWN, false, "Unable to add PHU to FPA.");
    270                     psFree(fpa);
    271                     psFree(view);
    272                     return NULL;
    273                 }
    274             } else {
    275                 pmCell *cell;                   // Cell from chip
    276                 while ((cell = pmFPAviewNextCell(view, fpa, 1))) {
    277                     if (phuLevel == PM_FPA_LEVEL_CELL) {
    278                         if (!pmFPAAddSourceFromView(fpa, "Stack", view, output->format)) {
    279                             psError(PS_ERR_UNKNOWN, false, "Unable to add PHU to FPA.");
    280                             psFree(fpa);
    281                             psFree(view);
    282                             return NULL;
    283                         }
    284                     }
    285                 }
    286             }
    287         }
    288     }
    289     psFree(view);
     254    if (!pmFPAAddSourceFromFormat(fpa, "Stack", output->format)) {
     255        psError(PS_ERR_UNKNOWN, false, "Unable to generate output FPA.");
     256        psFree(fpa);
     257        return false;
     258    }
    290259
    291260    // Output mask
Note: See TracChangeset for help on using the changeset viewer.