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:
@ -120,6 +120,7 @@ class MagneticField(Drivable):
|
||||
)
|
||||
heatswitch = Attached(Switch, description='name of heat switch device')
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
Status = Enum(Drivable.Status, PERSIST=PERSIST, PREPARE=301, RAMPING=302, FINISH=303)
|
||||
|
||||
status = Parameter(datatype=TupleOf(EnumType(Status), StringType()))
|
||||
@ -193,6 +194,7 @@ class MagneticField(Drivable):
|
||||
self.log.error(self, 'main thread exited unexpectedly!')
|
||||
|
||||
def stop(self):
|
||||
"""stop at current value"""
|
||||
self.write_target(self.read_value())
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user