Index: simulator/plugins/treatmentranges/loader.py =================================================================== diff -u -r341770d5391499aea02f9a840ac96e6562215699 -r967521dff94783ce48b50abc8db6bcd67bb501bf --- simulator/plugins/treatmentranges/loader.py (.../loader.py) (revision 341770d5391499aea02f9a840ac96e6562215699) +++ simulator/plugins/treatmentranges/loader.py (.../loader.py) (revision 967521dff94783ce48b50abc8db6bcd67bb501bf) @@ -10,7 +10,7 @@ # parent from simulator.dynamicloader import DynamicLoader # hd Simulator -from dialin.ui.hd_simulator import HDSimulator +from simulator.interface import SimulationInterface # plugin specific # -- none -- @@ -30,9 +30,8 @@ spnUFVolumeMax: QtWidgets.QSpinBox sldDurationValue: QtWidgets.QSlider - def __init__(self, hd_simulator: HDSimulator): - super().__init__(os.path.dirname(__file__), hd_simulator) - print(" ---------- ", self.hd_simulator) + def __init__(self, interface: SimulationInterface): + super().__init__(os.path.dirname(__file__), interface) def _init_loader(self): """ @@ -54,6 +53,7 @@ :return: none """ self.timer.timeout.connect(self.do_ranges_data) + self.timer.timeout.connect(self.do_duration_data) self.sldDurationValue.valueChanged.connect(self.do_duration_data) @@ -71,10 +71,11 @@ sends the duration message :return: none """ - value = self.sldDurationValue.value() - self.hd_simulator.cmd_set_treatment_time( - self.spnDurationMax.value() * 60, value - ) + if self.chkRangesBroadcast.isChecked(): + value = self.sldDurationValue.value() + self.interface.hd.cmd_set_treatment_time( + self.spnDurationMax.value() * 60, value + ) @Slot() def do_ranges_data(self): @@ -88,7 +89,7 @@ self.sldDurationValue.setMinimum(duration_min * 60) self.sldDurationValue.setMaximum(duration_max * 60) - self.hd_simulator.cmd_set_treatment_parameter_ranges( + self.interface.hd.cmd_set_treatment_parameter_ranges( duration_min, duration_max, self.spnUFVolumeMin.value(),