summaryrefslogtreecommitdiff
path: root/spectro/ss.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2015-08-23 12:22:51 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2015-08-23 12:22:51 +0200
commitbc3604d9b226ac475a104cd8ae2ca2d1d4a27984 (patch)
treee796661f371a94a50edfdc693388bb911b253dfd /spectro/ss.c
parent509016be676f7915d635fa57144d2a441e3090ca (diff)
parentc0b89ac5bfb90835ef01573267020e42d4fe070c (diff)
Merge new upstream release
Diffstat (limited to 'spectro/ss.c')
-rwxr-xr-x[-rw-r--r--]spectro/ss.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/spectro/ss.c b/spectro/ss.c
index e01dd7a..90720ca 100644..100755
--- a/spectro/ss.c
+++ b/spectro/ss.c
@@ -1411,7 +1411,8 @@ char id[CALIDLEN] /* Condition identifier (ie. white reference ID) */
if (p->noinitcalib == 0) {
/* Make sure we're in a condition to do the calibration */
- if (p->itype == instSpectrolino && *calc != inst_calc_man_ref_white) {
+ if (p->itype == instSpectrolino
+ && (*calc & inst_calc_cond_mask) != inst_calc_man_ref_white) {
*calc = inst_calc_man_ref_white;
a1logd(p->log, 3, "ss cal need cond. inst_calc_man_ref_white and haven't got it\n");
return inst_cal_setup;
@@ -1519,7 +1520,7 @@ char id[CALIDLEN] /* Condition identifier (ie. white reference ID) */
a1logd(p->log, 3, "ss cal need trans, spectrolino\n");
/* Make sure we're in a condition to do the calibration */
- if (*calc != inst_calc_man_trans_white) {
+ if ((*calc & inst_calc_cond_mask) != inst_calc_man_trans_white) {
*calc = inst_calc_man_trans_white;
a1logd(p->log, 3, "ss cal need cond. inst_calc_man_trans_white and haven't got it\n");
return inst_cal_setup;
@@ -2074,7 +2075,7 @@ extern ss *new_ss(icoms *icom, instType itype) {
/* Init state */
p->icom = icom;
- p->itype = icom->itype;
+ p->itype = itype;
p->cap = inst_mode_none; /* Unknown until initialised */
p->mode = inst_mode_none; /* Not in a known mode yet */
p->nextmode = inst_mode_none; /* Not in a known mode yet */