Skip to content
Snippets Groups Projects
Commit de6c250e authored by Martin Killenberg's avatar Martin Killenberg
Browse files

fix: only single measurement is cancelled, not whole sweep

parent fd1b2206
No related branches found
No related tags found
No related merge requests found
......@@ -112,14 +112,11 @@ class Measurements:
self.perform_single_measurement(self.output_basename+'_'+str(measurement_number)+'.csv', next_temp,
next_hum, next_soaking, next_reads)
measurement_number += 1
if process_sync.stop_measurement.is_set():
break
except KeyboardInterrupt:
pass
except MeasurementPlot.PlottingError:
# Just the plotting failed, probably because the window was closed
# The measurement was partly done and should be plotted, so the following code has to see the correct
# number of successful measurements
measurement_number += 1
plt.close()
......@@ -156,6 +153,8 @@ class Measurements:
+ str(target_hum) + ' rel. hum.',
color="red")
self.perform_single_measurement(output_name, target_temp, target_hum, soaking_time, n_stable_reads)
if process_sync.stop_measurement.is_set():
break
except KeyboardInterrupt:
pass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment