IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 27, 2005, 3:21:40 PM (20 years ago)
Author:
eugene
Message:

substantial work to move kii/kapa call into libkapa

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/cmd.data/section.c

    r4689 r5850  
    66  int Ngraph, Xgraph;
    77  Graphdata graphmode;
     8  KapaSection section;
    89
    910  List = FALSE;
     
    2122  if (!GetGraph (&graphmode, &Xgraph, &Ngraph)) return (FALSE);
    2223
     24  /* list sections */
    2325  if (argc == 1) {
    24     /* list section */
    25     SendGraphCommand (Xgraph, 4, "LSEC");
    26     SendGraphMessage (Xgraph, "* %s", argv[1]);
     26    KapaGetSection (Xgraph, "*");
    2727    fprintf (stderr, "USAGE: section name [x y dx dy]\n");
    2828    return (TRUE);
     
    3030 
    3131  if (argc == 2) {
    32     /* set section */
     32    /* select / show section */
    3333    if (List) {
    34       SendGraphCommand (Xgraph, 4, "LSEC");
     34      KapaGetSection (Xgraph, argv[1]);
    3535    } else {
    36       SendGraphCommand (Xgraph, 4, "SSEC");
     36      KapaSelectSection (Xgraph, argv[1]);
    3737    }
    38     SendGraphMessage (Xgraph, "%s", argv[1]);
    3938    return (TRUE);
    4039  }
    4140 
    4241  if (argc == 6) {
    43     /* define section */
    44     SendGraphCommand (Xgraph, 4, "DSEC");
    45     SendGraphMessage (Xgraph, "%s %6.3f %6.3f %6.3f %6.3f", argv[1], atof (argv[2]), atof (argv[3]), atof (argv[4]), atof (argv[5]));
     42    /* set section */
     43    section.name = argv[1];
     44    section.x = atof (argv[2]);
     45    section.y = atof (argv[3]);
     46    section.dx = atof (argv[4]);
     47    section.dy = atof (argv[5]);
     48    KapaSetSection (Xgraph, &section);
    4649    return (TRUE);
    4750  }
     
    5053}
    5154
    52     /* should do some range checking on x y dx dy
    53        should be between 0.0 and 1.0, precision of 0.001
    54        is sufficient
    55     */
     55/* should do some range checking on x y dx dy
     56   should be between 0.0 and 1.0, precision of 0.001
     57   is sufficient
     58*/
Note: See TracChangeset for help on using the changeset viewer.