Skip to content

Commit

Permalink
Merge pull request #732 from lnls-sirius/update-bpm-pv
Browse files Browse the repository at this point in the history
Update BPM detail windows to consider new lock status PV
  • Loading branch information
anacso17 authored Feb 17, 2025
2 parents 56e6719 + d8cfd6a commit c7814b6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pyqt-apps/siriushla/as_ap_rabpmmon/custom_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class BPMMonLed(_BaseMonLedMultiChan):
"""BPM monitor led."""

def __init__(self, parent=None, device='', prefix=''):
p2v = {'ADCAD9510PllStatus-Mon': 1}
p2v = {'ClksLocked-Mon': 1}
super().__init__(
parent, device=device, propties2values=p2v, prefix=prefix,
command='sirius-hla-as-di-bpm.py')
Expand Down
2 changes: 1 addition & 1 deletion pyqt-apps/siriushla/as_di_bpms/list_bpms.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def __init__(self, parent=None, prefix='', bpm=''):
def setupui(self):
hbl = QHBoxLayout(self)
hbl.setContentsMargins(0, 0, 0, 0)
chan2vals = {'RFFEasyn.CNCT': 1, 'ADCAD9510PllStatus-Mon': 1}
chan2vals = {'RFFEasyn.CNCT': 1, 'ClksLocked-Mon': 1}
chan2vals = {self.get_pvname(k): v for k, v in chan2vals.items()}
led = PyDMLedMultiChannel(self, channels2values=chan2vals)
led.setToolTip(self.bpm)
Expand Down
2 changes: 1 addition & 1 deletion pyqt-apps/siriushla/as_di_bpms/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def setupui(self):
hbl.addSpacing(10)
hbl.addStretch()
if not self.is_pbpm:
chan2vals = {'RFFEasyn.CNCT': 1, 'ADCAD9510PllStatus-Mon': 1}
chan2vals = {'RFFEasyn.CNCT': 1, 'ClksLocked-Mon': 1}
chan2vals = {self.get_pvname(k): v for k, v in chan2vals.items()}
led = PyDMLedMultiChannel(self, channels2values=chan2vals)
hbl.addWidget(led)
Expand Down
20 changes: 12 additions & 8 deletions pyqt-apps/siriushla/as_di_bpms/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ def setupui(self):
gdl = QGridLayout(grpbx)
props = (
('RFFEasyn.CNCT', 'RFFE Connected'),
('ADCAD9510PllStatus-Mon', 'ADC Clock Synched'))
('ADCAD9510PllStatus-Mon', 'FMC PLL Clock Locked'),
('MMCMLocked-Mon', 'MMCM Clock Locked'),
('ClksLocked-Mon', 'All Clocks Locked'),
)
for i, prop in enumerate(props):
led = SiriusLedState(grpbx, init_channel=self.get_pvname(prop[0]))
led.setOffColor(led.Red)
Expand Down Expand Up @@ -414,15 +417,17 @@ def setupui(self):
vlay0.addWidget(self._setupActiveClockWidget())
vlay0.addWidget(self._setupAD9510PLLWidget())

vlay1 = QVBoxLayout()
vlay1.setContentsMargins(0, 0, 0, 0)
vlay1.addWidget(self._setupADCsWidget())
# vlay1 = QVBoxLayout()
# vlay1.setContentsMargins(0, 0, 0, 0)
# vlay1.addWidget(self._setupADCsWidget())

lay.addLayout(vlay0, 1, 0)
lay.addLayout(vlay1, 1, 1)
# lay.addLayout(vlay1, 1, 1)

def _setupADCCommonWidget(self):
return self._create_formlayout_groupbox('ADC Common', (
('MMCMLocked-Mon', 'MMCM Status',
[('ledstate', SiriusLedState.Red, SiriusLedState.LightGreen)]),
('ADCTrigDir-Sel', 'Trigger Direction'),
('ADCTrigTerm-Sel', 'Trigger Termination'),
('ADCTestDataEn-Sel', 'Enable test data',
Expand All @@ -433,16 +438,15 @@ def _setupAD9510PLLWidget(self):
return self._create_formlayout_groupbox('AD9510 PLL', (
('ADCAD9510PllStatus-Mon', 'PLL Status',
[('ledstate', SiriusLedState.Red, SiriusLedState.LightGreen)]),
('ADCAD9510Defaults-Sel', 'Reset',
[('pushbutton', 'Reset', None, 1, 0)]),
# ('ADCAD9510Defaults-Sel', 'Reset',
# [('pushbutton', 'Reset', None, 1, 0)]),
('ADCAD9510ADiv-SP', 'A divider', ['lineedit', 'label']),
('ADCAD9510BDiv-SP', 'B divider', ['lineedit', 'label']),
('ADCAD9510RDiv-SP', 'R divider', ['lineedit', 'label']),
))

def _setupActiveClockWidget(self):
return self._create_formlayout_groupbox('Active Clock', (
('INFOClkFreq-SP', 'Clock Frequency [Hz]', ['lineedit', 'label']),
('ADCSi57xOe-Sel', 'Osc. output enable',
['statebutton', 'ledstate']),
('ADCSi57xFreq-SP', 'Osc. Frequency [Hz]', ['lineedit', 'label']),
Expand Down

0 comments on commit c7814b6

Please sign in to comment.