diff --git a/.gitignore b/.gitignore index b63ea8b..7d16bf9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,14 @@ +reset_lis +reset_lis~ hush_devl.sh reset_lis *.*~ *.*-* *.*+* -pyrcc5 +pyrcc5/ pyrcc5/*.* +pyrcc5/__pycache__ +pyrcc5/__pycache__/* src/*.*~ src/*.*-* src/*.*+* diff --git a/hush.py b/hush.py index 27f56ca..5d603bb 100644 --- a/hush.py +++ b/hush.py @@ -112,7 +112,8 @@ class StartMain(BaseWindow): sector = ["
IP2: ","
IW2: ","
PK1: ", "
PK2: ","
SNQ: ", "
UCN: ","
------------------
Tot: "] - pvlist = ['ZIP2-HUSH:TOTSAVE', 'ZIW2-HUSH:TOTSAVE', 'ZPK1-HUSH:TOTSAVE', + + pvlist = ['ZIP2-HUSH:TOTSAVE', 'ZIW2-HUSH:TOTSAVE', 'ZPK1-HUSH:TOTSAVE', 'ZPK2-HUSH:TOTSAVE', 'ZSINQ-HUSH:TOTSAVE', 'ZUCN-HUSH:TOTSAVE', 'ZHIPA-HUSH:TOTSAVE'] diff --git a/hush.sh b/hush.sh index e0fd73f..b517530 100755 --- a/hush.sh +++ b/hush.sh @@ -45,7 +45,6 @@ _EPICS_HOST_ARCH=${RHREL}-x86_64 #C_EXT version for Py 3.7: export PYTHONPATH=.:/opt/gfa/cafe/python/pycafe/cafe-1.19.3/lib/${_EPICS_HOST_ARCH}:/hipa/bd/applications/deps/apps4ops/v1.6.0 -#export PYTHONPATH=.:/opt/gfa/cafe/python/pycafe/cafe-1.19.3/lib/RHEL8-x86_64:/hipa/bd/applications/deps/apps4ops/v1.6.0 #:/afs/psi.ch/intranet/SLS/Controls/BD/pyqtacc/v1.5.2 diff --git a/src/gui.py b/src/gui.py index 69bf9d3..1e90308 100644 --- a/src/gui.py +++ b/src/gui.py @@ -43,7 +43,11 @@ class AppGui(QWidget): self.parent = parent self.cafe = self.parent.cafe self.cyca = self.parent.cyca +<<<<<<< HEAD +======= + +>>>>>>> 2175ec5fadac6050f1f2e6a5cf363855493df4d0 self.send_to_log_window = self.parent.send_to_log_window self.gui_frame = self.parent.gui_frame self.gui_header = self.parent.gui_header @@ -203,7 +207,16 @@ class AppGui(QWidget): def receive_sec_state(handle, pv, pvdata): +<<<<<<< HEAD +======= + #print(pv) + #pvdata.show() + #pvsplit = pv.split(":") + #secsplit = pvsplit[0].split("SEC-") + #sec = secsplit[1] + #now ZIP2-HUSH +>>>>>>> 2175ec5fadac6050f1f2e6a5cf363855493df4d0 pvsplit = pv.split("-") secsplit = pvsplit[0].split("Z") sec = secsplit[1] @@ -644,9 +657,14 @@ class AppGui(QWidget): #updates of SOL also update PWR, and vice-versa #Do not click if already on standby!! +<<<<<<< HEAD update_enabled = is_update_enabled() if update_enabled: +======= + + if is_update_enabled(): +>>>>>>> 2175ec5fadac6050f1f2e6a5cf363855493df4d0 self.table_pwr_dict[sector].init_value_button.setEnabled(False) _table.init_value_button.click() time.sleep(0.05) @@ -669,11 +687,19 @@ class AppGui(QWidget): if status != self.cyca.ICAFE_NORMAL: self.check_status_list(pv_list, status_list, _line()) +<<<<<<< HEAD #Seqeuncer ONLY determines when to go into STANDBY mode #and NOT the HLA ##pv = 'Z' + target.sector + "-HUSH:STATE" ##stat = self.cafe.set(pv, 0) ##self.check_status(pv, stat, _line()) +======= + #pv = 'SEC-' + target.sector + ":STATE" + pv = 'Z' + target.sector + "-HUSH:STATE" + stat = self.cafe.set(pv, 0) + self.check_status(pv, stat, _line()) + +>>>>>>> 2175ec5fadac6050f1f2e6a5cf363855493df4d0 #Disable because _table.set_standby_values() enables it if not update_enabled: @@ -692,12 +718,19 @@ class AppGui(QWidget): if status != self.cyca.ICAFE_NORMAL: self.check_status_list(pv_list, status_list, _line()) +<<<<<<< HEAD #Seqeuncer ONLY determines when to go into STANDBY mode #and NOT the HLA #pv = 'Z' + target.sector + "-HUSH:STATE" #stat = self.cafe.set(pv, 1) #self.check_status(pv, stat, _line()) +======= + #pv = 'SEC-' + target.sector + ":STATE" + pv = 'Z' + target.sector + "-HUSH:STATE" + stat = self.cafe.set(pv, 1) + self.check_status(pv, stat, _line()) +>>>>>>> 2175ec5fadac6050f1f2e6a5cf363855493df4d0 _table_pwr = self.table_pwr_dict[sector] row_pwr_dict = _table_pwr.get_init_values() diff --git a/summary2004.txt b/summary2004.txt new file mode 100644 index 0000000..8adb910 --- /dev/null +++ b/summary2004.txt @@ -0,0 +1,11 @@ +Summary for 2024 + +Power saved for the current year stands at 1516.412 MWh: +IP2: 314.258 MWh +IW2: 91.529 MWh +PK1: 86.399 MWh +PK2: 393.997 MWh +SNQ: 178.202 MWh +UCN: 452.027 MWh +------------------ +Tot: 1516.412 MWh diff --git a/zero_totsave b/zero_totsave new file mode 100644 index 0000000..68bac19 --- /dev/null +++ b/zero_totsave @@ -0,0 +1,9 @@ +caput ZIP2-HUSH:TOTSAVE 0 +caput ZIW2-HUSH:TOTSAVE 0 +caput ZPK1-HUSH:TOTSAVE 0 +caput ZPK2-HUSH:TOTSAVE 0 +caput ZSINQ-HUSH:TOTSAVE 0 +caput ZUCN-HUSH:TOTSAVE 0 +caput ZHIPA-HUSH:TOTSAVE 0 + + diff --git a/zero_totsave~ b/zero_totsave~ new file mode 100644 index 0000000..ad78aaf --- /dev/null +++ b/zero_totsave~ @@ -0,0 +1,14 @@ +caput ZIP2-HUSH:TOTSAVE 197.85 +caput ZIW2-HUSH:TOTSAVE 73.92 +caput ZPK1-HUSH:TOTSAVE 69.49 +caput ZPK2-HUSH:TOTSAVE 374.06 +caput ZSINQ-HUSH:TOTSAVE 131.20 +caput ZUCN-HUSH:TOTSAVE 283.40 +caput ZHIPA-HUSH:TOTSAVE 1129.92 + +caput ZIP2-HUSH:LASTPWR 67.503 +caput ZIW2-HUSH:LASTPWR 353.041 +caput ZPK1-HUSH:LASTPWR 337.081 +caput ZPK2-HUSH:LASTPWR 400.857 +caput ZSINQ-HUSH:LASTPWR 570.319 +caput ZUCN-HUSH:LASTPWR 124.609