max_position = _base.convert_volts_to_bits(
output_axis.config['channel'],
output_axis.config['maximum'])
+ if min_position >= max_position:
+ for k,v in output_axis.config['channel'].items():
+ _LOG.error((k,v))
+ raise ValueError(
+ ('invalid range {} - {} for {} axis {} (configured with {} - {})'
+ ).format(
+ min_position, max_position, piezo.config.get('name', piezo),
+ axis_name, output_axis.config['minimum'],
+ output_axis.config['maximum']))
return (min_position, max_position)
def get_surface_position_data(piezo, axis_name, max_deflection, steps=2000,