[PATCH] ComediSubDeviceDOut cleanup

I need the ComediSubDeviceDOut device driver for a digital out card
(not a DIO). I found strange constructs in the Orocos driver code for
this comedi subdevice. If you're into comedi, please look at the
patch, and in case you are the code author, explain to me why my patch
can fix things by deleting a bunch of code :-)

If this is the state of the Orocos comedi driver code, a lot of fixing
is required.

Peter

[PATCH] ComediSubDeviceDOut cleanup

On 10/23/07, Peter Soetens

<peter [dot] soetens [..] ...> wrote:
> I need the ComediSubDeviceDOut device driver for a digital out card
> (not a DIO). I found strange constructs in the Orocos driver code for
> this comedi subdevice. If you're into comedi, please look at the
> patch, and in case you are the code author, explain to me why my patch
> can fix things by deleting a bunch of code :-)

The patch seems ok (at first sight, but then again, "going fast" is
dangerous, as is shown below).

It seems like this code is a typical example of a too hasty copy paste
process (as indicated in the .hpp file), which seemed to have worked
out by accident for the cards we used until now. The code in checkBit
is merely a copy of the readSequence() code in the DIn file. This
proves that either
- the author was drunk when copying this code
- the author is a complete moron
[I do hope the author is not a non-alcoholic]

(Shame on)
The code copier ("author" would be to much of a compliment in this case: -)