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

Location:
trunk/Ohana/src/opihi/cmd.astro
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/cmd.astro/gauss.c

    r2843 r3693  
    5151
    5252  fcntl (Ximage, F_SETFL, !O_NONBLOCK); 
    53   write (Ximage, "CURS", 4); /* ask Ximage to look for the keystrokes */
     53  SendGraphCommand (Ximage, 4, "CURS");
    5454 
    5555  for (i = 0; (i < Nspot) || (Nspot == 0); i++) {
     
    6464   
    6565  }
    66   write (Ximage, "NCUR", 4); /* tell Ximage "end of keystrokes" */
     66  SendGraphCommand (Ximage, 4, "NCUR");
     67
    6768  return (TRUE);
    6869}
  • trunk/Ohana/src/opihi/cmd.astro/objload.c

    r3462 r3693  
    6666  free (buffer);
    6767
    68   write (Ximage, "LOAD", 4); /* force Ximage to look for the incoming image */
    69   sprintf (line, "OVER %9d ", n);
    70   write (Ximage, line, 16);
     68  SendGraphCommand (Ximage, 4, "LOAD");
     69  SendGraphCommand (Ximage, 16, "OVER %9d ", n);
    7170 
     71  /** NOTE: modify to use NBYTE **/
    7272  ALLOCATE (buffer, char, 66000);
    7373  bzero (buffer, 65536);
     
    7575    snprintf (&buffer[Nout*128], 129, "%15s %20.10f %20.10f %20.10f %20.10f ", "BOX", X[i], Y[i], 5.0, 5.0);
    7676    if (Nout == 512) {
    77       sprintf (line, "NLINES  %7d ", Nout);
    78       write (Ximage, line, 16);
     77      SendGraphCommand (Ximage, 16, "NLINES  %7d ", Nout);
    7978      write (Ximage, buffer, Nout*128);
    8079      bzero (buffer, 65536);
     
    8483
    8584  if (Nout) {
    86     sprintf (line, "NLINES  %7d ", Nout);
    87     write (Ximage, line, 16);
     85    SendGraphCommand (Ximage, 16, "NLINES  %7d ", Nout);
    8886    write (Ximage, buffer, Nout*128);
    8987  }
    90   sprintf (line, "DONE ");
    91   write (Ximage, line, 16);
     88  SendGraphCommand (Ximage, 16, "DONE");
    9289
    9390  free (X);
  • trunk/Ohana/src/opihi/cmd.astro/outline.c

    r2598 r3693  
    158158      Nline = 0;
    159159     
    160       write (Ximage, "LOAD", 4); /* force Ximage to look for the incoming image */
    161       sprintf (line, "OVER %9d ", 0);
    162       write (Ximage, line, 16);
     160      SendGraphCommand (Ximage, 4, "LOAD");
     161      SendGraphCommand (Ximage, 16, "OVER %9d ", 0);
    163162     
    164163      dx = par[2];
     
    178177       
    179178        if (Nline >= 510) {
    180           sprintf (line, "NLINES  %7d ", Nline);
    181           write (Ximage, line, 16);
     179          SendGraphCommand (Ximage, 16, "NLINES  %7d ", Nline);
    182180          write (Ximage, buffer, Nline*128);
    183181          bzero (buffer, 65536);
     
    185183        }
    186184      }
    187      
    188       sprintf (line, "NLINES  %7d ", Nline);
    189       write (Ximage, line, 16);
     185
     186      SendGraphCommand (Ximage, 16, "NLINES  %7d ", Nline);
    190187      write (Ximage, buffer, Nline*128);
    191       sprintf (line, "DONE ");
    192       write (Ximage, line, 16);
     188      SendGraphCommand (Ximage, 16, "DONE");
     189
    193190      free (buffer);
    194191      free (line);
  • trunk/Ohana/src/opihi/cmd.astro/outline2.c

    r2843 r3693  
    316316  Nline = 0;
    317317 
    318   write (Ximage, "LOAD", 4); /* force Ximage to look for the incoming image */
    319   sprintf (line, "OVER %9d ", 0);
    320   write (Ximage, line, 16);
     318  SendGraphCommand (Ximage, 4, "LOAD");
     319  SendGraphCommand (Ximage, 16, "OVER %9d ", 0);
    321320 
    322321  dx = par[2];
     
    336335   
    337336    if (Nline >= 510) {
    338       sprintf (line, "NLINES  %7d ", Nline);
    339       write (Ximage, line, 16);
     337      SendGraphCommand (Ximage, 16, "NLINES  %7d ", Nline);
    340338      write (Ximage, buffer, Nline*128);
    341339      bzero (buffer, 65536);
     
    344342  }
    345343 
    346   sprintf (line, "NLINES  %7d ", Nline);
    347   write (Ximage, line, 16);
     344  SendGraphCommand (Ximage, 16, "NLINES  %7d ", Nline);
    348345  write (Ximage, buffer, Nline*128);
    349   sprintf (line, "DONE ");
    350   write (Ximage, line, 16);
     346  SendGraphCommand (Ximage, 16, "DONE");
     347
    351348  free (buffer);
    352349  free (line);
Note: See TracChangeset for help on using the changeset viewer.