surface: Ensure min_position < max_position in _get_min_max_positions master
authorW. Trevor King <wking@tremily.us>
Sat, 11 May 2013 14:57:57 +0000 (10:57 -0400)
committerW. Trevor King <wking@tremily.us>
Sat, 11 May 2013 14:57:57 +0000 (10:57 -0400)
commit435f2cfc70ff9eb3ccd473db9cd697238c5a68c5
treeb917f5e0bb9308797e2f35fed4d6054aa592eb5d
parent38c97d9e260e336e936258c126e742e7ab22afa5
surface: Ensure min_position < max_position in _get_min_max_positions

Otherwise log the configuration and raise a ValueError.

It's unlikely that a user misconfigures their ranges, but it is
possible.  It is also possible that a bug in pycomedi---like the one
fixed by 27562b0 (channel: Fix to-physical setup in
AnalogChannel._get_converter, 2013-01-17)---leads to a broken
inverse-conversion-coefficients configuration.  That bug is now fixed,
but if it happened once, it might happen again ;).
pypiezo/surface.py