summaryrefslogtreecommitdiff
path: root/spectro/chartread.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2014-09-01 15:43:52 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2014-09-01 15:43:52 +0200
commitc07d0c2d2f6f7b0eb6e92cc6204bf05037957e82 (patch)
tree41791cbe367cf023b98043fee56f9346b2592b49 /spectro/chartread.c
parentd7f89e6fe63b8697fab5a901cfce457b375638b3 (diff)
Imported Upstream version 1.6.3upstream/1.6.3
Diffstat (limited to 'spectro/chartread.c')
-rw-r--r--spectro/chartread.c28
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();