Commit 4fb0d070 authored by Sebastien Petitdemange's avatar Sebastien Petitdemange
Browse files

Merge branch 'encoder_reading' into 'master'

New `check_encoder` config parameter for Axis object

See merge request !386
parents d7129a94 ea100a83
......@@ -186,14 +186,6 @@ class Axis(object):
return self.config.get("steps_per_unit", float, 1)
def encoder_steps_per_unit(self):
"""Current encoder steps per unit (:obj:`float`)"""
if self.encoder is not None:
return self.encoder.steps_per_unit
return self.config.get("encoder_steps_per_unit",float,
def tolerance(self):
"""Current tolerance in dial units (:obj:`float`)"""
return self.config.get("tolerance", float, 1E-4)
......@@ -617,7 +609,7 @@ class Axis(object):
self._backlash_move(backlash_start, motion.backlash, polling_time)
elif stopped:
elif self.encoder is not None:
elif self.config.get("check_encoder", bool, False) and self.encoder:
def _jog_move(self, velocity, direction, polling_time):
......@@ -12,11 +12,6 @@ import gevent.event
from bliss.common import event
from bliss.common.axis import get_axis, Modulo
"""def test_get_axis():
robz = get_axis("robz")
assert robz
def test_property_setting(robz):
assert robz.velocity() == 100
......@@ -28,6 +28,7 @@ controller:
velocity: 50
acceleration: 1
encoder: $m1enc
check_encoder: True
- name: m0
velocity: 1000
acceleration: 100
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment