Commit 5c8fa80f authored by Matias Guijarro's avatar Matias Guijarro
Browse files

common/measurement.py: IntegratingCounter must have a master controller

parent 10f4d4aa
......@@ -415,7 +415,7 @@ class IntegratingCounter(Counter):
self,
name,
controller,
master_controller=None,
master_controller,
grouped_read_handler=None,
conversion_function=None,
):
......@@ -437,10 +437,7 @@ class IntegratingCounter(Counter):
name, grouped_read_handler, conversion_function, controller
)
if master_controller is None:
self._master_controller_ref = lambda: None
else:
self._master_controller_ref = weakref.ref(master_controller)
self._master_controller_ref = weakref.ref(master_controller)
def get_values(self, from_index=0):
"""
......
......@@ -46,5 +46,5 @@ DEFAULT_CONTROLLER = simulation_diode_controller()
def simulation_diode(name, config, default=DEFAULT_CONTROLLER):
controller = None if config.get("independent") else default
if config.get("integration"):
return SimulationDiodeIntegratingCounter(name, controller)
return SimulationDiodeIntegratingCounter(name, controller, lambda: None)
return SimulationDiodeSamplingCounter(name, controller)
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