frappy_psi.phytron: stop motor before restart
restarting the phytron motor without prior stop leads to funny behaviour. - send stop before restart - stop motor when moving but status not busy - restart when motor drives the wrong way + better status text when stopping Change-Id: I82cd59297b3c79a354a4eeb5ba03fc65bedf755f Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/31929 Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de> Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
@@ -89,7 +89,10 @@ class HasStates:
|
||||
elif newstate:
|
||||
# restart case
|
||||
if status is not None:
|
||||
status = sm.status[0], f'restarting ({status[1]})'
|
||||
if sm.status[1] == status[1]:
|
||||
status = sm.status
|
||||
else:
|
||||
status = sm.status[0], f'restarting ({status[1]})'
|
||||
else:
|
||||
# start case
|
||||
status = self.get_status(sm.next_task.newstate, BUSY)
|
||||
|
||||
Reference in New Issue
Block a user