Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1ace05b5ab | |||
| e3bd4fd0cd | |||
| 3831c4ecb5 |
@@ -21,7 +21,7 @@ from pyrcc5 import hush_resources
|
|||||||
|
|
||||||
_pymodule = os.path.basename(__file__)
|
_pymodule = os.path.basename(__file__)
|
||||||
_appname, _appext = _pymodule.split(".")
|
_appname, _appext = _pymodule.split(".")
|
||||||
_appversion = "2.0.0"
|
_appversion = "2.3.0"
|
||||||
# _title = """HIPA Power Usage & Saving Hierarchy""" #, HUSH!"""
|
# _title = """HIPA Power Usage & Saving Hierarchy""" #, HUSH!"""
|
||||||
_title = """HUSH!"""
|
_title = """HUSH!"""
|
||||||
|
|
||||||
@@ -185,7 +185,7 @@ class StartMain(BaseWindow):
|
|||||||
All rights reserved.</p>
|
All rights reserved.</p>
|
||||||
<p>Author: J. Chrin, Spring 2023 </p>
|
<p>Author: J. Chrin, Spring 2023 </p>
|
||||||
<p>(EPICS db adapted from A. Kovach, 2016) <p>
|
<p>(EPICS db adapted from A. Kovach, 2016) <p>
|
||||||
<p>IOC Administrator: H. Lutz </p>
|
<p>IOC Administrator: P. Fernandez (prev. H. Lutz) </p>
|
||||||
<p>1st Responsible: A. Barchetti, Tel. 4779
|
<p>1st Responsible: A. Barchetti, Tel. 4779
|
||||||
or 3301 (Control Room) </p>
|
or 3301 (Control Room) </p>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cd /hipa/bd/applications/hush/hla/2.2.0
|
cd /hipa/bd/applications/hush/hla/2.3.0
|
||||||
|
|
||||||
# For use if script is sourced rather than executed
|
# For use if script is sourced rather than executed
|
||||||
appNameDefault="hush.sh"
|
appNameDefault="hush.sh"
|
||||||
@@ -17,6 +17,9 @@ else
|
|||||||
echo "Interactive/sourced script"
|
echo "Interactive/sourced script"
|
||||||
fi
|
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 and 3.10
|
# Select Python Version here. Currently one of 3.5, 3.7, 3.8 and 3.10
|
||||||
PYTHON_VERSION=3.10
|
PYTHON_VERSION=3.10
|
||||||
|
|
||||||
@@ -32,6 +35,7 @@ if [ "$1" ]; then
|
|||||||
elif [ "$1" == "3.7" -o "$1" == "37" ]; then
|
elif [ "$1" == "3.7" -o "$1" == "37" ]; then
|
||||||
PYTHON_VERSION=3.7
|
PYTHON_VERSION=3.7
|
||||||
PYTHON_VERSION_DIR=37
|
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
|
elif [ "$1" == "3.8" -o "$1" == "38" ]; then
|
||||||
PYTHON_VERSION=3.8
|
PYTHON_VERSION=3.8
|
||||||
PYTHON_VERSION_DIR=38
|
PYTHON_VERSION_DIR=38
|
||||||
@@ -50,13 +54,11 @@ fi
|
|||||||
|
|
||||||
echo "PYTHON_VERSION $PYTHON_VERSION"
|
echo "PYTHON_VERSION $PYTHON_VERSION"
|
||||||
|
|
||||||
_EPICS_HOST_ARCH=${RHREL}-x86_64
|
|
||||||
#_EPICS_HOST_ARCH=${EPICS_HOST_ARCH}
|
|
||||||
. /opt/gfa/python $PYTHON_VERSION
|
. /opt/gfa/python $PYTHON_VERSION
|
||||||
|
|
||||||
#C_EXT version for Py 3.5, 3.7. 3.8, 3.10:
|
#C_EXT version for Py 3.5, 3.7. 3.8, 3.10:
|
||||||
|
|
||||||
export PYTHONPATH=.:/opt/gfa/cafe/python/pycafe/cafe-1.20.0-gcc-7.5.0/lib/${_EPICS_HOST_ARCH}:/hipa/bd/applications/deps/apps4ops/v1.11.0
|
export PYTHONPATH=.:/opt/gfa/cafe/python/pycafe/cafe-1.21.0/lib/${_EPICS_HOST_ARCH}:/hipa/bd/applications/deps/apps4ops/v1.12.0
|
||||||
|
|
||||||
echo $PYTHONPATH
|
echo $PYTHONPATH
|
||||||
|
|
||||||
@@ -111,3 +113,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if [ "${PYTHON_VERSION}" == "3.7" ] ; then
|
||||||
|
unset LD_PRELOAD
|
||||||
|
fi
|
||||||
|
|||||||
Binary file not shown.
+21
-7
@@ -19,7 +19,11 @@ from qtpy.QtWidgets import (
|
|||||||
QPushButton, QTabBar, QTabWidget, QTableWidgetItem, QTextEdit, QVBoxLayout,
|
QPushButton, QTabBar, QTabWidget, QTableWidgetItem, QTextEdit, QVBoxLayout,
|
||||||
QWidget)
|
QWidget)
|
||||||
|
|
||||||
from common.packages import elog
|
try:
|
||||||
|
import elog
|
||||||
|
except:
|
||||||
|
from common.packages import elog
|
||||||
|
|
||||||
|
|
||||||
from apps4ops.bdbase.utils import _line
|
from apps4ops.bdbase.utils import _line
|
||||||
|
|
||||||
@@ -1100,11 +1104,19 @@ class AppGui(QWidget):
|
|||||||
pass
|
pass
|
||||||
# HIPA Log Book
|
# HIPA Log Book
|
||||||
else:
|
else:
|
||||||
attributes["Eintrag"] = self.elog_enum.eintrag.INFO.name
|
required_dict = self.parent.settings.data['ElogBooks'][
|
||||||
attributes["Effekt"] = self.elog_enum.effekt.NONE.name # keiner
|
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
|
||||||
# "Elektorversogung"
|
# "Elektorversogung"
|
||||||
attributes["System"] = self.elog_enum.system.ELECTRICAL_SUPPLY.name
|
attributes["System"] = optional_dict["System"][
|
||||||
attributes["Ort"] = self.elog_enum.ort.GLOBAL.name
|
self.elog_enum.system.ELECTRICAL_SUPPLY]
|
||||||
|
attributes["Ort"] = optional_dict["Ort"][
|
||||||
|
self.elog_enum.ort.GLOBAL]
|
||||||
|
|
||||||
log_mess = self.parent.message.replace("<br>", "\n")
|
log_mess = self.parent.message.replace("<br>", "\n")
|
||||||
|
|
||||||
@@ -1116,8 +1128,10 @@ class AppGui(QWidget):
|
|||||||
self.statusbar.showMessage("Reset Savings Account." +
|
self.statusbar.showMessage("Reset Savings Account." +
|
||||||
"Last values sent to elog")
|
"Last values sent to elog")
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
print("Exception in sendelog.py", str(ex), flush=True)
|
print("Exception in gui.py", str(ex), flush=True)
|
||||||
mess = "Failed to write last saving values to elog:" + str(ex)
|
print(attributes)
|
||||||
|
mess = ("Failed to write last saving values to " +
|
||||||
|
"logbook {0}: {1}").format(self.parent.logbook, str(ex))
|
||||||
self.show_log_message(
|
self.show_log_message(
|
||||||
MsgSeverity.ERROR, _pymodule, _line(), mess)
|
MsgSeverity.ERROR, _pymodule, _line(), mess)
|
||||||
self.statusbar.showMessage(mess)
|
self.statusbar.showMessage(mess)
|
||||||
|
|||||||
Reference in New Issue
Block a user