Mercurial > hg > fxanalyse
comparison KKFX80E.c @ 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 | 4f1f353e84f5 |
children |
comparison
equal
deleted
inserted
replaced
192:f105ac22da05 | 193:3427013e4f70 |
---|---|
85 { | 85 { |
86 FX_ClosePort(); | 86 FX_ClosePort(); |
87 } | 87 } |
88 | 88 |
89 | 89 |
90 int FX_Send(char *cmd) | 90 int FX_Send(char cmd) |
91 { | 91 { |
92 int rv = FX_SendCommand(&cmd); | 92 char *p = &cmd; |
93 int rv = FX_SendCommand(&p); | |
93 if (! rv) | 94 if (! rv) |
94 errormsg = cmd; | 95 errormsg = p; |
95 return rv; | 96 return rv; |
96 } | 97 } |
97 | 98 |
98 | 99 |
99 int FX_Recv(char **ret, int timeout) | 100 int FX_Recv(char **ret, int timeout) |
106 rv = FX_GetReport(&data); | 107 rv = FX_GetReport(&data); |
107 if ((Timer() - mark) > timeout) { | 108 if ((Timer() - mark) > timeout) { |
108 rv = 0; | 109 rv = 0; |
109 data = "Function FX_Recv: Timeout"; | 110 data = "Function FX_Recv: Timeout"; |
110 } | 111 } |
112 Delay(0.01); | |
111 } while ((! data) && (rv == 1)); | 113 } while ((! data) && (rv == 1)); |
112 | 114 |
113 if (! rv) { | 115 if (! rv) { |
114 errormsg = data; | 116 errormsg = data; |
115 data = NULL; | 117 data = NULL; |