IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 23, 2006, 5:31:41 PM (20 years ago)
Author:
eugene
Message:

cleanup of timeouts and thread-safety issues, controller comms

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/pantasks/controller_status.c

    r7917 r8548  
    1515  status = CheckControllerStatus ();
    1616  if (!status) {
    17     gprint (GP_LOG, "controller is not running\n");
     17    gprint (GP_LOG, "controller is not active\n");
    1818    return (TRUE);
    1919  }
    2020
     21
    2122  sprintf (command, "status");
    2223  InitIOBuffer (&buffer, 0x100);
     24
     25  SerialThreadLock ();
    2326  status = ControllerCommand (command, CONTROLLER_PROMPT, &buffer);
     27  SerialThreadUnlock ();
     28
    2429  if (status) {
    2530    gwrite (buffer.buffer, 1, buffer.Nbuffer, GP_LOG);
    2631  } else {
    27     gprint (GP_LOG, "controller is down\n");
     32    gprint (GP_LOG, "controller is not communicating\n");
    2833  }
    2934  FreeIOBuffer (&buffer);
Note: See TracChangeset for help on using the changeset viewer.