v2.3.2
This commit is contained in:
2
hush.sh
2
hush.sh
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
cd /hipa/bd/applications/hush/hla/2.3.1
|
||||
cd /hipa/bd/applications/hush/hla/2.3.2
|
||||
|
||||
# For use if script is sourced rather than executed
|
||||
appNameDefault="hush.sh"
|
||||
|
||||
45
src/gui.py
45
src/gui.py
@@ -152,15 +152,17 @@ class AppGui(QWidget):
|
||||
|
||||
print(sector, self.sector_designated_magnet_standby_dict[sector])
|
||||
|
||||
wgt = self.group_sector_qtabwidget()
|
||||
self.gui_frame.measurement_layout.addWidget(
|
||||
wgt, 0, 1, 6, 3, alignment=Qt.AlignTop)
|
||||
|
||||
|
||||
|
||||
|
||||
status_wgt = self.group_sector_status()
|
||||
|
||||
self.gui_frame.measurement_layout.addWidget(
|
||||
status_wgt, 2, 0, 2, 1, alignment=Qt.AlignTop) # | Qt.AlignHCenter)
|
||||
|
||||
wgt = self.group_sector_qtabwidget()
|
||||
self.gui_frame.measurement_layout.addWidget(
|
||||
wgt, 0, 1, 6, 3, alignment=Qt.AlignTop)
|
||||
|
||||
self.groupbox_simple_mode = self.group_simple_mode()
|
||||
qgridlo = QGridLayout()
|
||||
@@ -173,12 +175,12 @@ class AppGui(QWidget):
|
||||
qwgt.setFixedWidth(1400)
|
||||
qwgt.setFixedHeight(800)
|
||||
|
||||
|
||||
self.gui_frame.central_tab_widget.insertTab(0, qwgt, "Skin")
|
||||
|
||||
|
||||
|
||||
self.gui_frame.central_tab_widget.insertTab(0, qwgt, "Skin")
|
||||
self.gui_frame.central_tab_widget.setCurrentIndex(0)
|
||||
|
||||
|
||||
|
||||
|
||||
self.gui_frame.results_wgt.setFixedWidth(1500)
|
||||
self.gui_frame.results_wgt.setFixedHeight(860)
|
||||
@@ -311,7 +313,7 @@ class AppGui(QWidget):
|
||||
|
||||
def enable_disable_pk(sect, sector_line, value):
|
||||
self.sectorI_dict[sect] = value
|
||||
|
||||
self.sectorI_dict["IW2"] = self.cafe.getCache("MXC2:IST:2")
|
||||
#print("==>sector firing", sect, "with value", value)
|
||||
|
||||
for sector in sector_line:
|
||||
@@ -755,6 +757,7 @@ class AppGui(QWidget):
|
||||
sector_wgt_dict = {}
|
||||
sector_wgt_dict["INJ2"] = self.ca_table_rf_widget(sector="INJ2")
|
||||
|
||||
|
||||
for sector in self.settings.data["header"][idx:]:
|
||||
sector_wgt_dict[sector] = self.ca_table_sector_widget(
|
||||
sector=sector)
|
||||
@@ -900,7 +903,7 @@ class AppGui(QWidget):
|
||||
if sector == "UCN":
|
||||
write_to_restore_ucn()
|
||||
|
||||
QApplication.processEvents(QEventLoop.AllEvents, 1)
|
||||
#QApplication.processEvents() #QEventLoop.AllEvents, 1)
|
||||
|
||||
# Do NOT do updates if in standby mode!
|
||||
# Update button is disabled when in standby
|
||||
@@ -909,28 +912,33 @@ class AppGui(QWidget):
|
||||
# updates of SOL also update PWR, and vice-versa
|
||||
# Do not click if already on standby!!
|
||||
|
||||
print(f'on_sector_standby: TARGET = {target} SECTOR = {sector}',
|
||||
flush=True)
|
||||
|
||||
with self.lock:
|
||||
update_enabled = is_update_enabled()
|
||||
|
||||
if update_enabled:
|
||||
|
||||
self.table_pwr_dict[sector].init_value_button.setEnabled(False)
|
||||
table.init_value_button.click()
|
||||
self.table_pwr_dict[sector].init_value_button.setEnabled(False)
|
||||
table.init_value_button.click()
|
||||
time.sleep(0.05)
|
||||
self.table_pwr_dict[sector].init_value_button.setEnabled(True)
|
||||
|
||||
table.init_value_button.setEnabled(False)
|
||||
self.table_pwr_dict[sector].init_value_button.click()
|
||||
table.init_value_button.setEnabled(False)
|
||||
self.table_pwr_dict[sector].init_value_button.click()
|
||||
time.sleep(0.05)
|
||||
self.table_sol_dict[sector].init_value_button.setEnabled(True)
|
||||
|
||||
QApplication.processEvents(QEventLoop.AllEvents, 1)
|
||||
print(f'after self-lock TARGET = {target} SECTOR = {sector}', flush=True)
|
||||
|
||||
if not self.input_parameters["simulation"]:
|
||||
if sector == "UCN":
|
||||
write_to_restore_ucn()
|
||||
status, status_list, pv_list = table.set_standby_values()
|
||||
|
||||
print(f'before table-set_standby_valkues(): TARGET = {target} SECTOR = {sector}')
|
||||
status, status_list, pv_list = table.set_standby_values()
|
||||
print(f'after table-set_standby_valkues(): TARGET = {target} SECTOR = {sector}')
|
||||
if status != self.cyca.ICAFE_NORMAL:
|
||||
#self.check_status_list(pv_list, status_list, _line())
|
||||
self.check_status_list(
|
||||
@@ -945,13 +953,16 @@ class AppGui(QWidget):
|
||||
# Disable because table.set_standby_values() enables it
|
||||
if not update_enabled:
|
||||
with self.lock:
|
||||
print(f'before FINAL self.lock TARGET = {target} SECTOR = {sector}')
|
||||
self.table_pwr_dict[sector].init_value_button.setEnabled(False)
|
||||
table.init_value_button.setEnabled(False)
|
||||
|
||||
self.timer_blink.singleShot(
|
||||
250, lambda: self.blink_target_beamline(sector, standby=True))
|
||||
|
||||
|
||||
print(f'END TARGET = {target} SECTOR = {sector}', flush=True)
|
||||
|
||||
|
||||
def on_sector_restore(self):
|
||||
target = self.sender()
|
||||
sector = target.sector
|
||||
|
||||
Reference in New Issue
Block a user