diff --git a/hush.py b/hush.py index 0b1306f..46a3117 100644 --- a/hush.py +++ b/hush.py @@ -181,7 +181,7 @@ class StartMain(BaseWindow): All rights reserved.

Author: J. Chrin, February 2024

(EPICS db adapted from A. Kovach, 2016)

-

IOC Administrator: H. Lutz

+

IOC Administrator: P. Fernandez (prev. H. Lutz)

1st Responsible: J. Chrin

Initiates energy saving procedures and records power saved

Python {2} - Qt {3} - PyQt {4}
diff --git a/hush.sh b/hush.sh index 6f973c5..77a3168 100755 --- a/hush.sh +++ b/hush.sh @@ -1,5 +1,5 @@ #!/bin/bash -cd /proscan/bd/applications/hush/hla/1.4.0 +cd /proscan/bd/applications/hush/hla/1.5.0 # For use if script is sourced rather than executed appNameDefault="hush.sh" @@ -20,6 +20,9 @@ else echo "Interactive/sourced script" fi +_EPICS_HOST_ARCH=${RHREL}-x86_64 +_EPICS_BASE=base-7.0.8 + # Select Python Version here. Currently one of 3.5, 3.7, 3.8, 3.10 PYTHON_VERSION=3.10 @@ -35,6 +38,7 @@ if [ "$1" ]; then elif [ "$1" == "3.7" -o "$1" == "37" ]; then PYTHON_VERSION=3.7 PYTHON_VERSION_DIR=37 + export LD_PRELOAD=/usr/local/epics/${_EPICS_BASE}/lib/${_EPICS_HOST_ARCH}/libca.so:/usr/local/epics/${_EPICS_BASE}/lib/${_EPICS_HOST_ARCH}/libCom.so elif [ "$1" == "3.8" -o "$1" == "38" ]; then PYTHON_VERSION=3.8 PYTHON_VERSION_DIR=38 @@ -52,8 +56,6 @@ fi echo "PYTHON_VERSION $PYTHON_VERSION" -_EPICS_HOST_ARCH=${RHREL}-x86_64 -#_EPICS_HOST_ARCH=${EPICS_HOST_ARCH} . /opt/gfa/python $PYTHON_VERSION @@ -114,3 +116,7 @@ else fi +if [ "${PYTHON_VERSION}" == "3.7" ] ; then + unset LD_PRELOAD +fi + diff --git a/hush_g1.sh b/hush_g1.sh index 1e4f426..ae07d64 100755 --- a/hush_g1.sh +++ b/hush_g1.sh @@ -1,5 +1,5 @@ #!/bin/bash -cd /proscan/bd/applications/hush/hla/1.4.0 +cd /proscan/bd/applications/hush/hla/1.5.0 # For use if script is sourced rather than executed appNameDefault="hush_g1.sh" @@ -20,6 +20,9 @@ else echo "Interactive/sourced script" fi +_EPICS_HOST_ARCH=${RHREL}-x86_64 +_EPICS_BASE=base-7.0.8 + # Select Python Version here. Currently one of 3.5, 3.7, 3,8, 3,10 PYTHON_VERSION=3.10 @@ -35,6 +38,7 @@ if [ "$1" ]; then elif [ "$1" == "3.7" -o "$1" == "37" ]; then PYTHON_VERSION=3.7 PYTHON_VERSION_DIR=37 + export LD_PRELOAD=/usr/local/epics/${_EPICS_BASE}/lib/${_EPICS_HOST_ARCH}/libca.so:/usr/local/epics/${_EPICS_BASE}/lib/${_EPICS_HOST_ARCH}/libCom.so elif [ "$1" == "3.8" -o "$1" == "38" ]; then PYTHON_VERSION=3.8 PYTHON_VERSION_DIR=38 @@ -52,8 +56,6 @@ fi echo "PYTHON_VERSION $PYTHON_VERSION" -_EPICS_HOST_ARCH=${RHREL}-x86_64 -#_EPICS_HOST_ARCH=${EPICS_HOST_ARCH} . /opt/gfa/python $PYTHON_VERSION #/sf/bd/applications/OnlineModel/current/PythonModule:/sf/bd/applications/OnlineModel/current @@ -119,3 +121,6 @@ else fi +if [ "${PYTHON_VERSION}" == "3.7" ] ; then + unset LD_PRELOAD +fi diff --git a/hush_g2.sh b/hush_g2.sh index 2765981..a254c33 100755 --- a/hush_g2.sh +++ b/hush_g2.sh @@ -1,5 +1,5 @@ #!/bin/bash -cd /proscan/bd/applications/hush/hla/1.4.0 +cd /proscan/bd/applications/hush/hla/1.5.0 # For use if script is sourced rather than executed appNameDefault="hush_g2.sh" @@ -20,6 +20,9 @@ else echo "Interactive/sourced script" fi +_EPICS_HOST_ARCH=${RHREL}-x86_64 +_EPICS_BASE=base-7.0.8 + # Select Python Version here. Currently one of 3.5, 3.7 PYTHON_VERSION=3.10 @@ -35,6 +38,8 @@ if [ "$1" ]; then elif [ "$1" == "3.7" -o "$1" == "37" ]; then PYTHON_VERSION=3.7 PYTHON_VERSION_DIR=37 + export LD_PRELOAD=/usr/local/epics/${_EPICS_BASE}/lib/${_EPICS_HOST_ARCH}/libca.so:/usr/local/epics/${_EPICS_BASE}/lib/${_EPICS_HOST_ARCH}/libCom.so + elif [ "$1" == "3.8" -o "$1" == "38" ]; then PYTHON_VERSION=3.8 PYTHON_VERSION_DIR=38 @@ -52,8 +57,6 @@ fi echo "PYTHON_VERSION $PYTHON_VERSION" -_EPICS_HOST_ARCH=${RHREL}-x86_64 -#_EPICS_HOST_ARCH=${EPICS_HOST_ARCH} . /opt/gfa/python $PYTHON_VERSION #/sf/bd/applications/OnlineModel/current/PythonModule:/sf/bd/applications/OnlineModel/current @@ -118,4 +121,6 @@ else python ${name}.py -u ${configSector}/${nameconfig}.json & fi - +if [ "${PYTHON_VERSION}" == "3.7" ] ; then + unset LD_PRELOAD +fi diff --git a/hush_g3.sh b/hush_g3.sh index 52018d9..cc80256 100755 --- a/hush_g3.sh +++ b/hush_g3.sh @@ -1,5 +1,5 @@ #!/bin/bash -cd /proscan/bd/applications/hush/hla/1.4.0 +cd /proscan/bd/applications/hush/hla/1.5.0 # For use if script is sourced rather than executed appNameDefault="hush_g3.sh" @@ -20,6 +20,9 @@ else echo "Interactive/sourced script" fi +_EPICS_HOST_ARCH=${RHREL}-x86_64 +_EPICS_BASE=base-7.0.8 + # Select Python Version here. Currently one of 3.5, 3.7, 3.8, 3.10 PYTHON_VERSION=3.10 @@ -35,6 +38,8 @@ if [ "$1" ]; then elif [ "$1" == "3.7" -o "$1" == "37" ]; then PYTHON_VERSION=3.7 PYTHON_VERSION_DIR=37 + export LD_PRELOAD=/usr/local/epics/${_EPICS_BASE}/lib/${_EPICS_HOST_ARCH}/libca.so:/usr/local/epics/${_EPICS_BASE}/lib/${_EPICS_HOST_ARCH}/libCom.so + elif [ "$1" == "3.8" -o "$1" == "38" ]; then PYTHON_VERSION=3.8 PYTHON_VERSION_DIR=38 @@ -52,8 +57,6 @@ fi echo "PYTHON_VERSION $PYTHON_VERSION" -_EPICS_HOST_ARCH=${RHREL}-x86_64 -#_EPICS_HOST_ARCH=${EPICS_HOST_ARCH} . /opt/gfa/python $PYTHON_VERSION #/sf/bd/applications/OnlineModel/current/PythonModule:/sf/bd/applications/OnlineModel/current @@ -117,4 +120,6 @@ else python ${name}.py -u ${configSector}/${nameconfig}.json & fi - +if [ "${PYTHON_VERSION}" == "3.7" ] ; then + unset LD_PRELOAD +fi diff --git a/hush_o2.sh b/hush_o2.sh index 1ce531f..205de7a 100755 --- a/hush_o2.sh +++ b/hush_o2.sh @@ -1,5 +1,5 @@ #!/bin/bash -cd /proscan/bd/applications/hush/hla/1.4.0 +cd /proscan/bd/applications/hush/hla/1.5.0 # For use if script is sourced rather than executed appNameDefault="hush_o2.sh" @@ -20,6 +20,9 @@ else echo "Interactive/sourced script" fi +_EPICS_HOST_ARCH=${RHREL}-x86_64 +_EPICS_BASE=base-7.0.8 + # Select Python Version here. Currently one of 3.5, 3.7 PYTHON_VERSION=3.10 @@ -35,6 +38,8 @@ if [ "$1" ]; then elif [ "$1" == "3.7" -o "$1" == "37" ]; then PYTHON_VERSION=3.7 PYTHON_VERSION_DIR=37 + export LD_PRELOAD=/usr/local/epics/${_EPICS_BASE}/lib/${_EPICS_HOST_ARCH}/libca.so:/usr/local/epics/${_EPICS_BASE}/lib/${_EPICS_HOST_ARCH}/libCom.so + elif [ "$1" == "3.8" -o "$1" == "38" ]; then PYTHON_VERSION=3.8 PYTHON_VERSION_DIR=38 @@ -53,8 +58,6 @@ fi echo "PYTHON_VERSION $PYTHON_VERSION" -_EPICS_HOST_ARCH=${RHREL}-x86_64 -#_EPICS_HOST_ARCH=${EPICS_HOST_ARCH} . /opt/gfa/python $PYTHON_VERSION #/sf/bd/applications/OnlineModel/current/PythonModule:/sf/bd/applications/OnlineModel/current @@ -118,4 +121,8 @@ else python ${name}.py -u ${configSector}/${nameconfig}.json & fi +if [ "${PYTHON_VERSION}" == "3.7" ] ; then + unset LD_PRELOAD +fi + diff --git a/hush_pif.sh b/hush_pif.sh index b367846..f52c414 100755 --- a/hush_pif.sh +++ b/hush_pif.sh @@ -1,5 +1,5 @@ #!/bin/bash -cd /proscan/bd/applications/hush/hla/1.4.0 +cd /proscan/bd/applications/hush/hla/1.5.0 # For use if script is sourced rather than executed appNameDefault="hush_pif.sh" @@ -20,6 +20,9 @@ else echo "Interactive/sourced script" fi +_EPICS_HOST_ARCH=${RHREL}-x86_64 +_EPICS_BASE=base-7.0.8 + # Select Python Version here. Currently one of 3.5, 3.7 PYTHON_VERSION=3.10 @@ -35,6 +38,8 @@ if [ "$1" ]; then elif [ "$1" == "3.7" -o "$1" == "37" ]; then PYTHON_VERSION=3.7 PYTHON_VERSION_DIR=37 + export LD_PRELOAD=/usr/local/epics/${_EPICS_BASE}/lib/${_EPICS_HOST_ARCH}/libca.so:/usr/local/epics/${_EPICS_BASE}/lib/${_EPICS_HOST_ARCH}/libCom.so + elif [ "$1" == "3.8" -o "$1" == "38" ]; then PYTHON_VERSION=3.8 PYTHON_VERSION_DIR=38 @@ -54,8 +59,6 @@ fi echo "PYTHON_VERSION $PYTHON_VERSION" -_EPICS_HOST_ARCH=${RHREL}-x86_64 -#_EPICS_HOST_ARCH=${EPICS_HOST_ARCH} . /opt/gfa/python $PYTHON_VERSION #/sf/bd/applications/OnlineModel/current/PythonModule:/sf/bd/applications/OnlineModel/current @@ -121,3 +124,8 @@ else fi +if [ "${PYTHON_VERSION}" == "3.7" ] ; then + unset LD_PRELOAD +fi + + diff --git a/src/gui.py b/src/gui.py index 518e90e..0ac09d7 100644 --- a/src/gui.py +++ b/src/gui.py @@ -16,7 +16,10 @@ from qtpy.QtWidgets import ( QMessageBox, QPushButton, QSpacerItem, QTabBar, QTabWidget, QTableWidgetItem, QTextEdit, QWidget) -from common.packages import elog +try: + import elog +except: + from common.packages import elog from apps4ops.bdbase.utils import _line from apps4ops.bdbase.enumkind import MsgSeverity @@ -1355,8 +1358,14 @@ class AppGui(QWidget): if "Sandkasten" in self.parent.logbook: attributes["Eintrag"] = "Anregung" else: - attributes["Eintrag"] = self.elog_enum.eintrag.INFO.name - attributes["Effekt"] = self.elog_enum.effekt.NONE.name #"keiner" + required_dict = self.parent.settings.data['ElogBooks'][ + self.parent.logbook]['Required'] + optional_dict = self.parent.settings.data['ElogBooks'][ + self.parent.logbook]['Optional'] + attributes["Eintrag"] = required_dict['Eintrag'][ + self.elog_enum.eintrag.INFO] + attributes["Effekt"] = optional_dict["Effekt"][ + self.elog_enum.effekt.NONE] # NONE='', NO=keiner log_mess = self.parent.message.replace("
", "\n")