Fixed bugs reported by csp@andrew.cmu.edu. The bug report was as follows:
I have been attempting to get a NI-ATAO10, a 10 channel legacy ISA analog output
board, working with comedi. Apparantely the way comedi_from_phys works to
convert voltage to sample doesn't seem to work correctly with the ATAO10 board.
I found that the correct sample data for the ATAO10 board is as follows:
In unipolar mode
0V = 2048
+10V = 6143
In bipolar mode
-10V = 2048
+10V = 6143
It seems that comedi_from_phys is somehow shifted by 2048 from what it should be
(comedi_from_phys gives values from 0 to 4095).
Furthermore, comedi does not detect the polarity of the board (I'm not sure if
this is possible on this board); thus the range is always reported as -10V to
+10V even if the board is set on unipolar mode (which is achieved by setting
jumpers on the board).
Finally, for some reason, channel 0 does not work with Comedi (the board fully
works in Windows). The other 9 channels work.