calibration: support to-physical-only softcal boards.
This is a hack to fix Éric Piel's issue:
On Thu, Oct 18, 2012 at 12:10:49PM +0200, Éric Piel wrote:
> Unfortunately, with my device there seems to still be a problem with
> comedi_get_softcal_converter(), which returns -1 with direction
> from_physical. I get the same problem when using the SWIG wrapper, so
> it's probably not an error in pycomedi. So when I run cmd.py I get this
> error, but it works anyway as the _to_phys converter works:
> ./cmd.py -f /dev/comedi0 -s 0 -c 0 -a diff -N 1 -p
> Exception pycomedi.PyComediError:
> PyComediError('comedi_get_softcal_converter: Resource temporarily
> unavailable (-1)',) in
> 'pycomedi.channel.AnalogChannel.get_softcal_converter' ignored
> 0.220157
I feel like we should make an effort to invert the from_physical
polynomial, but as a stop-gap measure, we can just raise the original
exception and let the user decide what to do about it.