From c0b89ac5bfb90835ef01573267020e42d4fe070c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 23 Aug 2015 12:17:05 +0200 Subject: Imported Upstream version 1.8.0 --- spectro/ss.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) mode change 100644 => 100755 spectro/ss.c (limited to 'spectro/ss.c') diff --git a/spectro/ss.c b/spectro/ss.c old mode 100644 new mode 100755 index e01dd7a..90720ca --- 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 */ -- cgit v1.2.3