summaryrefslogtreecommitdiff
path: root/spectro/dtp20.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2014-09-07 13:29:54 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2014-09-07 13:29:54 +0200
commita879b4e708b3e46c9697ba6581687eeb5b02a320 (patch)
treef85acc5cb1a7c0b03a050c879c20cab3deb9f40e /spectro/dtp20.c
parent556dffcdad42b938bc196819aa463247de709765 (diff)
parentc07d0c2d2f6f7b0eb6e92cc6204bf05037957e82 (diff)
state from 2014-09-07 13:30 MESZ
Diffstat (limited to 'spectro/dtp20.c')
-rw-r--r--spectro/dtp20.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/spectro/dtp20.c b/spectro/dtp20.c
index 84c4f2b..b378f50 100644
--- a/spectro/dtp20.c
+++ b/spectro/dtp20.c
@@ -7,7 +7,7 @@
* Author: Graeme W. Gill
* Date: 10/3/2001
*
- * Copyright 1996 - 2013, Graeme W. Gill
+ * Copyright 1996 - 2014, Graeme W. Gill
* All rights reserved.
*
* This material is licenced under the GNU GENERAL PUBLIC LICENSE Version 2 or later :-
@@ -108,7 +108,7 @@ char *in, /* In string */
char *out, /* Out string buffer */
int bsize, /* Out buffer size */
double to) { /* Timout in seconts */
- char tc = '>'; /* Terminating character */
+ char *tc = ">"; /* Terminating character */
int ntc = 1; /* Number of terminating characters */
int rv, se, insize;
@@ -128,7 +128,7 @@ double to) { /* Timout in seconts */
}
rv = DTP20_OK;
- if (tc == '>' && ntc == 1) { /* Expecting DTP type error code */
+ if (tc[0] == '>' && ntc == 1) { /* Expecting DTP type error code */
rv = extract_ec(out);
if (rv > 0) {
rv &= inst_imask;
@@ -221,8 +221,8 @@ dtp20_init_coms(inst *pp, baud_rate br, flow_control fc, double tout) {
dtp20_command(p, "0PR\r", buf, MAX_MES_SIZE, 0.5);
} else {
- a1logd(p->log, 1, "dtp20: Failed to find connection to instrument\n");
- return inst_coms_fail;
+ a1logd(p->log, 1, "dtp20: wrong communications type for device\n");
+ return inst_internal_error;
}
/* Check instrument is responding */
@@ -551,6 +551,7 @@ ipatch *vals) { /* Pointer to array of values */
if ((ev = dtp20_command(p, "0518CF\r", buf, MAX_RD_SIZE, 0.5)) != inst_ok)
return ev;
}
+
}
a1logv(p->log, 1, "All saved strips read\n");
@@ -779,6 +780,7 @@ ipatch *vals) { /* Pointer to array of instrument patch values */
return ev;
}
+
/* Wait for status to change */
for (;;) {
if ((ev = dtp20_command(p, "CS\r", buf, MAX_MES_SIZE, 0.2)) != inst_ok) {
@@ -1006,6 +1008,7 @@ instClamping clamp) { /* NZ if clamp XYZ/Lab to be +ve */
return ev;
}
+
if (!IMODETST(p->mode, inst_mode_s_ref_spot)) {
/* Clear the spot database so our reading doesn't appear as a stored reading */