- From: Brent Baccala <baccala_at_vger.freesoft.org>
- Date: Tue, 1 Jul 2003 01:20:38 -0400 (EDT)
On Tue, 1 Jul 2003, Bernd Porr wrote:
> Hi!
>
> I've just tested it.
>
> I think there is a bug in the section with the triggering. In the file
> comedi.c it should be:
>
> if (cmd.convert_src == TRIG_TIMER) {
> comedi_rate = 1e9 / cmd.convert_arg;
> comedi_rate /= active_channels;
> } else if (cmd.scan_begin_src == TRIG_TIMER) {
> comedi_rate = 1e9 / cmd.scan_begin_arg;
> } else {
> fprintf(stderr, "neither convert_src nor scan_begin_src is
> TRIG_TIMER!?!\n"$
> }
>
> The ad converter can do all conversions for all channels at once. Then
> scan_begin_src==TRIG_TIMER. The timer triggers an entire scan.
> Or the ad converter does every timer event only one conversion. Then
> convert_src==TRIG_TIMER.
> Hope that is really right. At least I've written this so in the driver.
OK, I'll believe it. I really don't quite understand all the possible
COMEDI command options myself. I have noticed (and noted in a
comment) that comedi_get_cmd_generic_timed caches its result, so if
you call it multiple times with different rates, the second and future
times you get the arguments set for the first time, so you have to go
back and set them yourselves. I'm not sure if this is a bug or not.
> The changed the scope works...
>
> ...however: it works only while I'm _moving_ the mouse pointer over the
> scope window...
I have no explanation. Obviously, it shouldn't do that.
> /Bernd
>
> --
> http://www.cn.stir.ac.uk/~bp1/
> mailto:bp1_at_cn.stir.ac.uk
>
>
>
--
-bwb
Brent Baccala
baccala_at_freesoft.org
Received on 2003-07-01Z04:20:38