summaryrefslogtreecommitdiff
path: root/spectro/spyd2.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2016-10-02 19:25:17 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2016-10-02 19:25:17 +0200
commitc2ca7be5a751879159f3cb591a64bb9568b79762 (patch)
tree04e38d4f4a2aad4d789bda0a65b7abb80a3439a2 /spectro/spyd2.c
parent45c152c326d87478fbf41714b4b8e2f7b57a282b (diff)
parent3db384424bd7398ffbb7a355cab8f15f3add009f (diff)
Updated version 1.9.1+repack from 'upstream/1.9.1+repack'
with Debian dir 98a996367aa69ae41accf9c6d369f600bc94de80
Diffstat (limited to 'spectro/spyd2.c')
-rw-r--r--spectro/spyd2.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/spectro/spyd2.c b/spectro/spyd2.c
index 6833e89..85a2d7f 100644
--- a/spectro/spyd2.c
+++ b/spectro/spyd2.c
@@ -819,10 +819,12 @@ spyd2_GetReading_ll(
msec_sleep(500);
a1logd(p->log, 1, "spyd2_GetReading_ll: reading retry with ICOM err 0x%x\n",se);
-#ifdef DO_RESETEP /* Do the miscelanous resetep()'s */
- a1logd(p->log, 1, "spyd2_GetReading_ll: resetting end point\n");
- p->icom->usb_resetep(p->icom, 0x81);
- msec_sleep(1); /* Let device recover ? */
+#ifdef DO_RESETEP /* Do the miscelanous resetep()'s every second time */
+ if ((retr & 1) == 0) {
+ a1logd(p->log, 1, "spyd2_GetReading_ll: resetting end point\n");
+ p->icom->usb_resetep(p->icom, 0x81);
+ msec_sleep(1); /* Let device recover ? */
+ }
#endif /* DO_RESETEP */
} /* End of whole command retries */
@@ -2888,7 +2890,7 @@ spyd2_init_coms(inst *pp, baud_rate br, flow_control fc, double tout) {
#endif
/* On OS X the Spyder 2 can't close properly */
-#if defined(__APPLE__) /* OS X*/
+#if defined(UNIX_APPLE) /* OS X*/
if (p->itype == instSpyder1
|| p->itype == instSpyder2) {
usbflags |= icomuf_reset_before_close; /* The spyder 2 USB is buggy ? */
@@ -3255,6 +3257,7 @@ static inst_code spyd2_calibrate(
inst *pp,
inst_cal_type *calt, /* Calibration type to do/remaining */
inst_cal_cond *calc, /* Current condition/desired condition */
+inst_calc_id_type *idtype, /* Condition identifier type */
char id[CALIDLEN] /* Condition identifier (ie. white reference ID) */
) {
spyd2 *p = (spyd2 *)pp;
@@ -3266,6 +3269,7 @@ char id[CALIDLEN] /* Condition identifier (ie. white reference ID) */
if (!p->inited)
return inst_no_init;
+ *idtype = inst_calc_id_none;
id[0] = '\000';
if ((ev = spyd2_get_n_a_cals((inst *)p, &needed, &available)) != inst_ok)
@@ -4060,7 +4064,18 @@ spyd2_get_set_opt(inst *pp, inst_opt_type m, ...) {
if (trans_time_prop != NULL) *trans_time_prop = p->led_trans_time_prop;
return inst_ok;
}
- return inst_unsupported;
+
+ /* Use default implementation of other inst_opt_type's */
+ {
+ inst_code rv;
+ va_list args;
+
+ va_start(args, m);
+ rv = inst_get_set_opt_def(pp, m, args);
+ va_end(args);
+
+ return rv;
+ }
}
/* Constructor */