changeset 193:3427013e4f70

Minor change to the KK FX80 interface
author Daniele Nicolodi <daniele.nicolodi@obspm.fr>
date Mon, 31 Mar 2014 17:03:32 +0200
parents f105ac22da05
children 4b74b81e0c79
files KKFX80E.c KKFX80E.h
diffstat 2 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/KKFX80E.c	Mon Mar 31 17:03:31 2014 +0200
+++ b/KKFX80E.c	Mon Mar 31 17:03:32 2014 +0200
@@ -87,11 +87,12 @@
 }
 
 
-int FX_Send(char *cmd)
+int FX_Send(char cmd)
 {
-	int rv = FX_SendCommand(&cmd);
+	char *p = &cmd;
+	int rv = FX_SendCommand(&p);
 	if (! rv)
-		errormsg = cmd;
+		errormsg = p;
 	return rv;
 }
 
@@ -108,6 +109,7 @@
 			rv = 0;
 			data = "Function FX_Recv: Timeout";
 		}
+		Delay(0.01);
 	} while ((! data) && (rv == 1));
 	
 	if (! rv) {
--- a/KKFX80E.h	Mon Mar 31 17:03:31 2014 +0200
+++ b/KKFX80E.h	Mon Mar 31 17:03:32 2014 +0200
@@ -15,7 +15,7 @@
 
 int FX_Open(char *port);
 void FX_Close(void);
-int FX_Send(char *cmd);
+int FX_Send(char cmd);
 int FX_Recv(char **data, int timeout);
 char * FX_Error(void);