diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-05-01 16:24:15 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-05-01 16:24:15 +0200 |
commit | a30ba67504ffd12c4db499adbb5ce47a7d1f6036 (patch) | |
tree | 9ae1a7e3849dda6bbb5c578232f6f2fa5b2e7e7e /spectro/instappsup.c | |
parent | 89e99e8a827859729729dfc92d74be4a8f96f1a4 (diff) | |
parent | 094535c010320967639e8e86f974d878e80baa72 (diff) |
New release 1.7.0
Diffstat (limited to 'spectro/instappsup.c')
-rw-r--r-- | spectro/instappsup.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/spectro/instappsup.c b/spectro/instappsup.c index c83c953..112bab5 100644 --- a/spectro/instappsup.c +++ b/spectro/instappsup.c @@ -168,7 +168,8 @@ inst_code inst_handle_calibrate( inst_cal_cond calc, /* Current current condition */ inst_code (*disp_setup) (inst *p,inst_cal_cond calc, disp_win_info *dwi), /* Callback for handling a display calibration - May be NULL */ - disp_win_info *dwi /* Information to be able to open a display test patch - May be NULL */ + disp_win_info *dwi, /* Information to be able to open a display test patch - May be NULL */ + int doimmediately /* If nz, don't wait for user, calibrate immediatley */ ) { inst_code rv = inst_ok, ev; int usermes = 0; /* User was given a message */ @@ -210,6 +211,10 @@ inst_code inst_handle_calibrate( printf("Calibration failed with '%s' (%s)\n", p->inst_interp_error(p, ev), p->interp_error(p, ev)); + + if (doimmediately) + return inst_user_abort; + printf("Hit any key to retry, or Esc or Q to abort:\n"); empty_con_chars(); @@ -262,14 +267,14 @@ inst_code inst_handle_calibrate( case inst_calc_man_em_dark: printf("Place cap on the instrument, or place on a dark surface,\n"); - printf("or place on the white calibration reference,\n"); + printf("or place on the calibration reference,\n"); printf(" and then hit any key to continue,\n"); printf(" or hit Esc or Q to abort: "); break; case inst_calc_man_am_dark: printf("Place ambient adapter and cap on the instrument,\n"); - printf("or place on the white calibration reference,\n"); + printf("or place on the calibration reference,\n"); printf(" and then hit any key to continue,\n"); printf(" or hit Esc or Q to abort: "); break; @@ -389,7 +394,8 @@ inst_code inst_handle_calibrate( usermes = 1; - if (calc != inst_calc_man_ref_whitek) { + if (!doimmediately + && calc != inst_calc_man_ref_whitek) { empty_con_chars(); ch = next_con_char(); printf("\n"); |