Skip to content
Snippets Groups Projects
Commit 8ab81b09 authored by BRONES Romain's avatar BRONES Romain
Browse files

add log

parent 896acd92
No related branches found
No related tags found
No related merge requests found
...@@ -571,13 +571,16 @@ class DG_PY_FOFBLegacy(Device): ...@@ -571,13 +571,16 @@ class DG_PY_FOFBLegacy(Device):
try: try:
if self._apply_cmds_to_x_plane: if self._apply_cmds_to_x_plane:
self.prx_fofbcommand.StopToZeroFofb_x() self.prx_fofbcommand.StopToZeroFofb_x()
self.info_stream("Performed StopToZero() on X")
if self._apply_cmds_to_z_plane: if self._apply_cmds_to_z_plane:
self.prx_fofbcommand.StopToZeroFofb_y() self.prx_fofbcommand.StopToZeroFofb_y()
self.info_stream("Performed StopToZero() on Y")
except Exception as e: except Exception as e:
self.error_stream("Failed to perform StopToZero()") self.error_stream("Failed to perform StopToZero()")
self.error_stream(str(e)) self.error_stream(str(e))
else: else:
self.info_stream("Performed StopToZero()") self.info_stream("Performed StopToZero()")
self.d_status["start"] = "{} StopToZero() done.".format(datetime.datetime.now().strftime("%M%D-%H%M"))
#----- PROTECTED REGION END -----# // DG_PY_FOFBLegacy.StopToZero #----- PROTECTED REGION END -----# // DG_PY_FOFBLegacy.StopToZero
@command( @command(
...@@ -587,14 +590,17 @@ class DG_PY_FOFBLegacy(Device): ...@@ -587,14 +590,17 @@ class DG_PY_FOFBLegacy(Device):
#----- PROTECTED REGION ID(DG_PY_FOFBLegacy.Stop) ENABLED START -----# #----- PROTECTED REGION ID(DG_PY_FOFBLegacy.Stop) ENABLED START -----#
try: try:
if self._apply_cmds_to_x_plane: if self._apply_cmds_to_x_plane:
self.info_stream("Perform Stop() on X")
self.prx_fofbcommand.StopFofb_x() self.prx_fofbcommand.StopFofb_x()
if self._apply_cmds_to_z_plane: if self._apply_cmds_to_z_plane:
self.prx_fofbcommand.StopFofb_y() self.prx_fofbcommand.StopFofb_y()
self.info_stream("Perform Stop() on Y")
except Exception as e: except Exception as e:
self.error_stream("Failed to perform Stop()") self.error_stream("Failed to perform Stop()")
self.error_stream(str(e)) self.error_stream(str(e))
else: else:
self.info_stream("Performed Stop()") self.info_stream("Performed Stop()")
self.d_status["start"] = "{} Stop() done.".format(datetime.datetime.now().strftime("%M%D-%H%M"))
#----- PROTECTED REGION END -----# // DG_PY_FOFBLegacy.Stop #----- PROTECTED REGION END -----# // DG_PY_FOFBLegacy.Stop
@command( @command(
...@@ -640,8 +646,10 @@ class DG_PY_FOFBLegacy(Device): ...@@ -640,8 +646,10 @@ class DG_PY_FOFBLegacy(Device):
if self._apply_cmds_to_x_plane: if self._apply_cmds_to_x_plane:
self.prx_fofbcommand.StartFofb_X() self.prx_fofbcommand.StartFofb_X()
self.info_stream("Perform Start() on X")
if self._apply_cmds_to_z_plane: if self._apply_cmds_to_z_plane:
self.prx_fofbcommand.StartFofb_Y() self.prx_fofbcommand.StartFofb_Y()
self.info_stream("Perform Start() on Y")
except Exception as e: except Exception as e:
self.d_status["start"] = "{} Start() failed.".format(datetime.datetime.now().strftime("%M%D-%H%M")) self.d_status["start"] = "{} Start() failed.".format(datetime.datetime.now().strftime("%M%D-%H%M"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment