From: Frank Mori Hess Date: Thu, 12 Jun 2003 19:57:43 +0000 (+0000) Subject: fix problems with set_target setting the target to NaN on unipolar ao ranges X-Git-Tag: r0_7_21~86 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=532ff2daa571bf0d020ec1c864f15441dd6a4a81;p=comedilib.git fix problems with set_target setting the target to NaN on unipolar ao ranges --- diff --git a/comedi_calibrate/comedi_calibrate.c b/comedi_calibrate/comedi_calibrate.c index a146bbe..90b80e6 100644 --- a/comedi_calibrate/comedi_calibrate.c +++ b/comedi_calibrate/comedi_calibrate.c @@ -318,6 +318,8 @@ void set_target( calibration_setup_t *setup, int obs,double target) comedi_range *range; lsampl_t maxdata, data; + comedi_set_global_oor_behavior( COMEDI_OOR_NUMBER ); + range = comedi_get_range(setup->dev, setup->observables[obs].preobserve_insn.subdev, CR_CHAN( setup->observables[obs].preobserve_insn.chanspec ), @@ -426,6 +428,7 @@ void measure_observable( calibration_setup_t *setup, int obs) sci_sprint_alt(s,sv.average,sv.error); DPRINT(0,"reading %s, target %g\n",s, setup->observables[obs].target); + assert( isnan( setup->observables[obs].target) == 0 ); } void observable_dependence(calibration_setup_t *setup, int obs)