diff options
Diffstat (limited to 'spectro/instappsup.c')
-rw-r--r-- | spectro/instappsup.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/spectro/instappsup.c b/spectro/instappsup.c index d2ce7ff..fc550b4 100644 --- a/spectro/instappsup.c +++ b/spectro/instappsup.c @@ -1,5 +1,5 @@ - /* Instrument command line application support functions */ +/* Instrument command line application support functions */ /* * Argyll Color Correction System @@ -72,7 +72,6 @@ static inst_code def_uicallback(void *cntx, inst_ui_purp purp) { return inst_user_trig; } - /* Change in measurement configuration */ } else if (purp == inst_measuring) { return inst_ok; } @@ -173,8 +172,9 @@ inst_code inst_handle_calibrate( 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 */ - char id[200]; /* Condition identifier */ + int usermes = 0; /* User was given a message */ + inst_calc_id_type idtype; /* Condition identifier type */ + char id[200]; /* Condition identifier */ int ch; a1logd(p->log,1,"inst_handle_calibrate called\n"); @@ -183,13 +183,15 @@ inst_code inst_handle_calibrate( for (;;) { a1logd(p->log,1,"About to call calibrate at top of loop\n"); - ev = p->calibrate(p, &calt, &calc, id); + ev = p->calibrate(p, &calt, &calc, &idtype, id); a1logd(p->log,1,"Calibrate returned calt 0x%x, calc 0x%x, ev 0x%x\n",calt,calc,ev); /* We're done */ if ((ev & inst_mask) == inst_ok) { - if ((calc & inst_calc_cond_mask) == inst_calc_message) + if ((calc & inst_calc_cond_mask) == inst_calc_message) { + /* (Or could create our own message text based on value of idtype) */ printf("%s\n",id); + } if (usermes) printf("Calibration complete\n"); fflush(stdout); @@ -249,7 +251,7 @@ inst_code inst_handle_calibrate( break; case inst_calc_man_ref_white: - printf("Place the instrument on its reflective white reference %s,\n",id); + printf("Place the instrument on its reflective white reference S/N %s,\n",id); printf(" and then hit any key to continue,\n"); break; @@ -448,12 +450,12 @@ inst2_capability inst_show_disptype_options(FILE *fp, char *oline, icompaths *ic olen = strlen(oline); /* lenth of option part of line */ - for (i = 0; icmps != NULL && i < icmps->npaths; i++) { + for (i = 0; icmps != NULL && i < icmps->ndpaths[dtix_inst]; i++) { inst *it; inst2_capability cap; int k; - if ((it = new_inst(icmps->paths[i], 1, g_log, NULL, NULL)) == NULL) { + if ((it = new_inst(icmps->dpaths[dtix_inst][i], 1, g_log, NULL, NULL)) == NULL) { notall = 1; continue; } |