mirror of
https://github.com/nqrduck/nqrduck-measurement.git
synced 2024-11-09 11:50:01 +00:00
Fixed bug with frequency setting.
This commit is contained in:
parent
18f0da7067
commit
38c68831c7
1 changed files with 6 additions and 1 deletions
|
@ -34,7 +34,7 @@ class MeasurementController(ModuleController):
|
|||
|
||||
# Use validator
|
||||
if self.module.model.validator_measurement_frequency.validate(value, 0) == QValidator.State.Acceptable:
|
||||
self.module.model.measurement_frequency = float(value)
|
||||
self.module.model.measurement_frequency = float(value) * 1e6
|
||||
self.module.nqrduck_signal.emit("set_frequency", str(self.module.model.measurement_frequency))
|
||||
|
||||
self.toggle_start_button()
|
||||
|
@ -70,6 +70,11 @@ class MeasurementController(ModuleController):
|
|||
logger.debug("Start measurement clicked")
|
||||
self.module.view.measurement_dialog.show()
|
||||
|
||||
# Set the measurement parameters again in case the user switches spectrometer
|
||||
self.module.nqrduck_signal.emit("set_frequency", str(self.module.model.measurement_frequency))
|
||||
self.module.nqrduck_signal.emit("set_averages", str(self.module.model.averages))
|
||||
QApplication.processEvents()
|
||||
|
||||
self.module.nqrduck_signal.emit("start_measurement", None)
|
||||
|
||||
def toggle_start_button(self) -> None:
|
||||
|
|
Loading…
Reference in a new issue