From c07d0c2d2f6f7b0eb6e92cc6204bf05037957e82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 1 Sep 2014 15:43:52 +0200 Subject: Imported Upstream version 1.6.3 --- spectro/chartread.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) (limited to 'spectro/chartread.c') diff --git a/spectro/chartread.c b/spectro/chartread.c index 1c2117a..376fc1c 100644 --- a/spectro/chartread.c +++ b/spectro/chartread.c @@ -438,22 +438,6 @@ a1log *log /* verb, debug & error log */ printf("The battery charged level is %.0f%%\n",batstat * 100.0); } - /* Set it to the appropriate mode */ - if (highres) { - if (IMODETST(cap, inst_mode_highres)) { - inst_code ev; - if ((ev = it->get_set_opt(it, inst_opt_highres)) != inst_ok) { - printf("\nSetting high res mode failed with error :'%s' (%s)\n", - it->inst_interp_error(it, ev), it->interp_error(it, ev)); - it->del(it); - return -1; - } - highres = 1; - } else { - a1logv(log, 1, "high resolution ignored - instrument doesn't support high res. mode\n"); - } - } - if (scan_tol != 1.0) { if (cap2 & inst2_has_scan_toll) { inst_code ev; @@ -675,6 +659,14 @@ a1log *log /* verb, debug & error log */ if (spectral) mode |= inst_mode_spectral; + if (highres) { + if (IMODETST(cap, inst_mode_highres)) { + mode |= inst_mode_highres; + } else { + a1logv(log, 1, "high resolution ignored - instrument doesn't support high res. mode\n"); + } + } + // ~~~ i1pro2 test code ~~~ */ if (uvmode) { if (!IMODETST(cap, inst_mode_ref_uv)) { @@ -2068,7 +2060,7 @@ usage() { if (icmps != NULL) icmps->del(icmps); exit(1); - } +} int main(int argc, char *argv[]) { int i, j; @@ -2206,6 +2198,7 @@ int main(int argc, char *argv[]) { /* Scan tolerance ratio */ else if (argv[fa][1] == 'T') { + fa = nfa; if (na == NULL) usage(); scan_tol = atof(na); @@ -2333,6 +2326,7 @@ int main(int argc, char *argv[]) { } else { usage(); } + fa = nfa; } else usage(); -- cgit v1.2.3