added auto_monitor=True for the image PV (otherwise callbacks do not work); height and width where switched in shape

This commit is contained in:
gac-maloja
2021-05-17 19:14:48 +02:00
parent d6234ba7f7
commit 9b3e2c1e01

View File

@ -55,6 +55,7 @@ class Camera(PVCollection):
width = base + ":WIDTH",
height = base + ":HEIGHT"
)
self.pvs.image.auto_monitor = True
def get(self):
data = self.pvs.image.get()
@ -64,7 +65,9 @@ class Camera(PVCollection):
def get_shape(self):
width = self.pvs.width.get()
height = self.pvs.height.get()
shape = (width, height)
width = int(round(width))
height = int(round(height))
shape = (height, width)
return shape
def add_callback(self, callback, **kwargs):