diff options
Diffstat (limited to 'spectro/chartread.c')
-rw-r--r-- | spectro/chartread.c | 28 |
1 files changed, 11 insertions, 17 deletions
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(); |