added time.sleep(0.01) to avoid UnicodeDecodeError: 'ascii' codec can't decode byte 0xfa in position 0: ordinal not in range(128) in getCtrlcache in receive_connect_update

This commit is contained in:
2025-05-14 09:55:11 +02:00
parent 13fa5c0f2e
commit e4213dfaee
2 changed files with 7 additions and 6 deletions

View File

@@ -584,6 +584,7 @@ class PVGateway(QWidget):
if status == self.cyca.ICAFE_CS_CONN:
self.initialize_connect = True
time.sleep(0.01)
self.pv_ctrl = self.cafe.getCtrlCache(self.handle)
self.pv_info = self.cafe.getChannelInfo(self.handle)
if self.pv_info is not None and self.record_type is None:

View File

@@ -287,8 +287,8 @@ class CAQMenu(QComboBox, PVGateway):
_width_scaling_factor = 1.1
self.setFixedHeight(fm.lineSpacing()*1.8)
self.setFixedWidth((qrect.width()+40) * _width_scaling_factor)
self.setFixedHeight(round(fm.lineSpacing()*1.8))
self.setFixedWidth(round((qrect.width()+40) * _width_scaling_factor))
self.qt_property_initial_values(qt_object_name=self.PV_CONTROLLER)
@@ -476,8 +476,8 @@ class CAQMessageButton(QPushButton, PVGateway):
_width_scaling_factor = 1.0
self.setText(self.msg_label)
self.setFixedHeight(int(fm.lineSpacing()*1.8))
self.setFixedWidth(int(qrect.width() * _width_scaling_factor))
self.setFixedHeight(round(fm.lineSpacing()*1.8))
self.setFixedWidth(round(qrect.width() * _width_scaling_factor))
self.qt_property_initial_values(qt_object_name=self.PV_CONTROLLER)
@@ -605,8 +605,8 @@ class CAQTextEntry(QLineEdit, PVGateway):
qrect = fm.boundingRect(self.suggested_text)
_width_scaling_factor = 1.2
self.setFixedHeight(int(fm.lineSpacing()*1.8))
self.setFixedWidth(int(qrect.width()+20 * _width_scaling_factor))
self.setFixedHeight(round(fm.lineSpacing()*1.8))
self.setFixedWidth(round(qrect.width()+20 * _width_scaling_factor))
self.qt_property_initial_values(qt_object_name=self.PV_CONTROLLER)