reduce communication traffic
- expermental change: no updates of unchanged values within 1 sec - reduce fast_pollfactor in trinamic - improve stop behaviour of dpm.DPM
This commit is contained in:
@ -81,7 +81,7 @@ class Motor(PersistentMixin, HasIodev, Drivable):
|
||||
# TupleOf(IntRange(0, 15), IntRange(0, 15)),
|
||||
# default=(8, 0))
|
||||
|
||||
value = Parameter('motor position', FloatRange(unit='deg', fmtstr='%.3f'))
|
||||
value = Parameter('motor position', FloatRange(unit='deg', fmtstr='%.3f'), poll=False, default=0) # polling by read_status
|
||||
zero = PersistentParam('zero point', FloatRange(unit='$'), readonly=False, default=0)
|
||||
encoder = HwParam('encoder reading', FloatRange(unit='$', fmtstr='%.1f'),
|
||||
209, ANGLE_SCALE, readonly=True, initwrite=False, persistent=True)
|
||||
@ -124,7 +124,8 @@ class Motor(PersistentMixin, HasIodev, Drivable):
|
||||
|
||||
|
||||
iodevClass = BytesIO
|
||||
fast_pollfactor = 0.001 # poll as fast as possible when busy
|
||||
# fast_pollfactor = 0.001 # poll as fast as possible when busy
|
||||
fast_pollfactor = 0.05
|
||||
_started = 0
|
||||
_calcTimeout = True
|
||||
_need_reset = None
|
||||
@ -400,6 +401,7 @@ class Motor(PersistentMixin, HasIodev, Drivable):
|
||||
def stop(self):
|
||||
self.comm(MOTOR_STOP, 0)
|
||||
self.status = self.Status.IDLE, 'stopped'
|
||||
self.target = self.value # indicate to customers that this was stopped
|
||||
self._started = 0
|
||||
|
||||
#@Command()
|
||||
|
Reference in New Issue
Block a user