Commit b4f4d671 authored by Valentin Valls's avatar Valentin Valls
Browse files

Allow to setup the fill_type by device property

parent f1034f6c
......@@ -133,6 +133,10 @@ class Simulator(PyTango.Device_4Impl):
peak_angles = map(float, peak_angles)
self._SimuCamera.getFrameGetter().setPeakAngles(peak_angles)
if self.fill_type and self.fill_type in Simulator._FillType:
fill_type = Simulator._FillType[self.fill_type]
self._SimuCamera.getFrameGetter().setFillType(fill_type)
@Core.DEB_MEMBER_FUNCT
def getFrameDimFromLongArray(self, dim_arr):
width, height, depth = dim_arr
......
......@@ -142,3 +142,16 @@ def test_property_frame_dim(cleanup_simulator):
assert frame_dim.getSize().getWidth() == 10
assert frame_dim.getSize().getHeight() == 20
assert frame_dim.getImageType() == Core.Bpp32
def test_property_fill_type(cleanup_simulator):
"""Setup the fill_type from tango properties
Check that the fill_type was set
"""
ct = Simulator.get_control()
properties = {"fill_type": "EMPTY"}
tango = MockedSimulator(properties)
camera = tango._SimuCamera
fill_type = camera.getFrameGetter().getFillType()
assert fill_type == Simulator.Simulator._FillType["EMPTY"]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment