summaryrefslogtreecommitdiff
path: root/spectro/ss.c
diff options
context:
space:
mode:
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 */