fix command doc string handling and change default stop doc string

- fix inheritance of command description
- when no stop method is given, then the description should indicate
  that stop is a no-op -> add missing doc strings to stop methods
- add test to make sure stop command doc strings are given
  when implemented

Change-Id: If891359350e8dcdec39a706841d61d4f8ec8926f
Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/33266
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Alexander Zaft <a.zaft@fz-juelich.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
2024-03-08 13:58:48 +01:00
parent b454f47a12
commit 0f50de9a7f
11 changed files with 75 additions and 30 deletions

View File

@ -483,6 +483,10 @@ class Temp(PpmsDrivable):
self._expected_target_time = time.time() + abs(target - self.value) * 60.0 / max(0.1, ramp)
def stop(self):
"""set setpoint to current value
but restrict to values between last target and current target
"""
if not self.isDriving():
return
if self.status[0] != StatusType.STABILIZING:
@ -612,6 +616,7 @@ class Field(PpmsDrivable):
# do not execute FIELD command, as this would trigger a ramp up of leads current
def stop(self):
"""stop at current driven Field"""
if not self.isDriving():
return
newtarget = clamp(self._last_target, self.value, self.target)
@ -714,6 +719,7 @@ class Position(PpmsDrivable):
return value # do not execute MOVE command, as this would trigger an unnecessary move
def stop(self):
"""stop motor"""
if not self.isDriving():
return
newtarget = clamp(self._last_target, self.value, self.target)