From a2331c9d0e48a3662a4c448f28b8a1c46eb013b1 Mon Sep 17 00:00:00 2001 From: John Winans Date: Wed, 14 Dec 1994 22:43:48 +0000 Subject: [PATCH] Changed a printf to logMsg and added a printing delay to use when the ibDebug flag is set so things come out closer to the proper order. --- src/devOpt/devGpibInteract.c | 6 ++++-- src/vxWorks/devOpt/devGpibInteract.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/devOpt/devGpibInteract.c b/src/devOpt/devGpibInteract.c index 4e9616e69..dba28096d 100644 --- a/src/devOpt/devGpibInteract.c +++ b/src/devOpt/devGpibInteract.c @@ -157,7 +157,7 @@ int GI(void) } ans = 0; /* set loop not to exit */ - printf("\n\n"); + logMsg("\n\n"); while ((ans != 'q') && (ans != 'Q')) { @@ -382,6 +382,8 @@ static int sendMsg(void) if (replyIsBack) { + if (ibDebug) + taskDelay(60); /* Allow debug printing to complete */ showGpibMsg(msgNum); } else @@ -440,7 +442,7 @@ static int gpibWork(struct gpibIntCmd *pCmd) } else if (status > (MAX_MSG_LENGTH - 1)) /* check length of resp */ { - printf("GPIB Response length equaled allocated space !!!\n"); + logMsg("GPIB Response length equaled allocated space !!!\n"); pCmd->resp[(MAX_MSG_LENGTH)] = '\0'; /* place \0 at end */ } else diff --git a/src/vxWorks/devOpt/devGpibInteract.c b/src/vxWorks/devOpt/devGpibInteract.c index 4e9616e69..dba28096d 100644 --- a/src/vxWorks/devOpt/devGpibInteract.c +++ b/src/vxWorks/devOpt/devGpibInteract.c @@ -157,7 +157,7 @@ int GI(void) } ans = 0; /* set loop not to exit */ - printf("\n\n"); + logMsg("\n\n"); while ((ans != 'q') && (ans != 'Q')) { @@ -382,6 +382,8 @@ static int sendMsg(void) if (replyIsBack) { + if (ibDebug) + taskDelay(60); /* Allow debug printing to complete */ showGpibMsg(msgNum); } else @@ -440,7 +442,7 @@ static int gpibWork(struct gpibIntCmd *pCmd) } else if (status > (MAX_MSG_LENGTH - 1)) /* check length of resp */ { - printf("GPIB Response length equaled allocated space !!!\n"); + logMsg("GPIB Response length equaled allocated space !!!\n"); pCmd->resp[(MAX_MSG_LENGTH)] = '\0'; /* place \0 at end */ } else