Merge branch 'wip' of gitlab.psi.ch-samenv:samenv/frappy into wip

This commit is contained in:
2021-06-08 11:07:31 +02:00
3 changed files with 12 additions and 5 deletions

View File

@ -165,6 +165,7 @@ class ModuleCtrl(QWidget):
result = None
qualifiers = {}
# XXX: flag missing data report as error
if result is not None:
showCommandResultDialog(command, args, result, qualifiers)
def _initModuleWidgets(self):

View File

@ -76,7 +76,13 @@ class GenericParameterWidget(ParameterWidget):
self.setLineEdit.text())
def updateValue(self, value):
self.currentLineEdit.setText(str(value))
fmtstr = getattr(self._datatype, 'fmtstr', '%s')
if value.readerror:
value = str(value)
else:
value = fmtstr % (value.value,)
self.currentLineEdit.setText(value)
# self.currentLineEdit.setText(str(value))
class EnumParameterWidget(GenericParameterWidget):

View File

@ -28,12 +28,12 @@ class Ls370Sim(Communicator):
('RDGR?%d', '1.0'),
('RDGST?%d', '0'),
('RDGRNG?%d', '0,5,5,0,0'),
('INSET?%d', '1,5,5,0,0'),
('FILTER?%d', '1,5,80'),
('INSET?%d', '1,3,3,0,0'),
('FILTER?%d', '1,1,80'),
]
OTHER_COMMANDS = [
('*IDN?', 'LSCI,MODEL370,370184,05302003'),
('SCAN?', '3,1'),
('SCAN?', '3,0'),
]
def earlyInit(self):