mirror of
https://github.com/nqrduck/nqrduck-spectrometer-simulator.git
synced 2024-11-09 11:10:04 +00:00
Improved error handling if simulation failed.
This commit is contained in:
parent
566375a9c1
commit
e78319393c
1 changed files with 10 additions and 4 deletions
|
@ -27,11 +27,17 @@ class DuckSimulatorController(BaseSpectrometerController):
|
||||||
|
|
||||||
measurement_data = simulator.run_sequence(sequence)
|
measurement_data = simulator.run_sequence(sequence)
|
||||||
|
|
||||||
|
if measurement_data:
|
||||||
# Emit the data to the nqrduck core
|
# Emit the data to the nqrduck core
|
||||||
logger.debug("Emitting measurement data")
|
logger.debug("Emitting measurement data")
|
||||||
self.module.nqrduck_signal.emit("statusbar_message", "Finished Simulation")
|
self.module.nqrduck_signal.emit("statusbar_message", "Finished Simulation")
|
||||||
|
|
||||||
self.module.nqrduck_signal.emit("measurement_data", measurement_data)
|
self.module.nqrduck_signal.emit("measurement_data", measurement_data)
|
||||||
|
else:
|
||||||
|
logger.warning("No measurement data was returned from the simulator")
|
||||||
|
self.module.nqrduck_signal.emit(
|
||||||
|
"measurement_error", "No measurement data was returned from the simulator. Did you set a TX pulse?"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def set_frequency(self, value: str) -> None:
|
def set_frequency(self, value: str) -> None:
|
||||||
|
|
Loading…
Reference in a new issue