IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 11, 2005, 10:37:51 AM (21 years ago)
Author:
eugene
Message:

moved kapa/kii communications to use SendGraphCommand functions

File:
1 edited

Legend:

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

    r2843 r3693  
    5151 
    5252  /* tell KII to expect overlay data */
    53   write (Ximage, "LOAD", 4);
    54   sprintf (buffer, "OVERLAY: %7d", ncolor);
    55   write (Ximage, buffer, 16);
     53  SendGraphCommand (Ximage, 4, "LOAD");
     54  SendGraphCommand (Ximage, 16, "OVERLAY: %7d", ncolor);
    5655 
    5756  dDEC = fabs(dec1 - dec0);
     
    8483  NY = buf[0].header.Naxis[1];
    8584
    86     /* find starting position
    87     RD_to_XY (&x0, &y0, MIN(ra0, ra1), dec + 0.1*dDEC, &coords);
    88     sprintf (label, format, dec);
    89     sprintf (buffer, "%15s %20.10f %20.10f %20.10f %20.10f ", "TEXT", x0, y0, (double)(strlen(label) + 1), 0.0);
    90     write (Ximage, buffer, 128);
    91     write (Ximage, label, strlen(label) + 1); */
    92 
    9385  dRA = MAX (fabs(ra1 - ra0) / 100.0, 0.1);
    9486  connect = FALSE;
     
    9789      RD_to_XY (&x1, &y1, ra, dec, &coords);
    9890      if ((x1 >= 0) && (x1 < NX) && (y1 >= 0) && (y1 < NY)) {
    99         if (connect) {
    100           sprintf (buffer, "%15s %20.10f %20.10f %20.10f %20.10f ", "LINE", x0, y0, (x1 - x0), (y1 - y0));
    101           write (Ximage, buffer, 128);
    102         }
     91        if (connect) SendGraphCommand (Ximage, 128, "%15s %20.10f %20.10f %20.10f %20.10f ", "LINE", x0, y0, (x1 - x0), (y1 - y0));
    10392        x0 = x1;
    10493        y0 = y1;
    10594        connect = TRUE;
    106       }
    107       else {
     95      } else {
    10896        connect = FALSE;
    10997      }
     
    143131      RD_to_XY (&x1, &y1, ra, dec, &coords);
    144132      if ((x1 >= 0) && (x1 < NX) && (y1 >= 0) && (y1 < NY)) {
    145         if (connect) {
    146           sprintf (buffer, "%15s %20.10f %20.10f %20.10f %20.10f ", "LINE", x0, y0, (x1 - x0), (y1 - y0));
    147           write (Ximage, buffer, 128);
    148         }
     133        if (connect) SendGraphCommand (Ximage, 128, "%15s %20.10f %20.10f %20.10f %20.10f ", "LINE", x0, y0, (x1 - x0), (y1 - y0));
    149134        x0 = x1;
    150135        y0 = y1;
    151136        connect = TRUE;
    152       }
    153       else {
     137      } else {
    154138        connect = FALSE;
    155139      }
     
    176160  */
    177161
    178   sprintf (buffer, "DONE");
    179   write (Ximage, buffer, 128);
     162  SendGraphCommand (Ximage, 128, "DONE");
    180163  return (TRUE);
    181164}
    182 
    183 
    184  
    185165
    186166/*
Note: See TracChangeset for help on using the changeset viewer.