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:
@ -55,6 +55,7 @@ class Camera(PVCollection):
|
|||||||
width = base + ":WIDTH",
|
width = base + ":WIDTH",
|
||||||
height = base + ":HEIGHT"
|
height = base + ":HEIGHT"
|
||||||
)
|
)
|
||||||
|
self.pvs.image.auto_monitor = True
|
||||||
|
|
||||||
def get(self):
|
def get(self):
|
||||||
data = self.pvs.image.get()
|
data = self.pvs.image.get()
|
||||||
@ -64,7 +65,9 @@ class Camera(PVCollection):
|
|||||||
def get_shape(self):
|
def get_shape(self):
|
||||||
width = self.pvs.width.get()
|
width = self.pvs.width.get()
|
||||||
height = self.pvs.height.get()
|
height = self.pvs.height.get()
|
||||||
shape = (width, height)
|
width = int(round(width))
|
||||||
|
height = int(round(height))
|
||||||
|
shape = (height, width)
|
||||||
return shape
|
return shape
|
||||||
|
|
||||||
def add_callback(self, callback, **kwargs):
|
def add_callback(self, callback, **kwargs):
|
||||||
|
Reference in New Issue
Block a user