changed/fixed behaviour of stop commands in PPMS
- make sure new target created by the stop command is between old and new target - fixed bad behaviour of level reading Change-Id: I484c0902c694c0edb81e2d9238985c05f92e04f4 Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/22100 Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de> Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
@ -81,7 +81,7 @@ def clamp(_min, value, _max):
|
||||
"""return the median of 3 values,
|
||||
|
||||
i.e. value if min <= value <= max, else min or max depending on which side
|
||||
value lies outside the [min..max] interval
|
||||
value lies outside the [min..max] interval. This works even when min > max!
|
||||
"""
|
||||
# return median, i.e. clamp the the value between min and max
|
||||
return sorted([_min, value, _max])[1]
|
||||
|
Reference in New Issue
Block a user