Skip to content
Snippets Groups Projects
Commit 34024d0a authored by Michael DM Dryden's avatar Michael DM Dryden
Browse files

Fixed issue #12. Forgot about how processes work. Added button state changes...

Fixed issue #12. Forgot about how processes work. Added button state changes to exceptions and experiment_done method.
parent 05c8954f
Branches
Tags
No related merge requests found
......@@ -364,26 +364,32 @@ class main:
else:
self.statusbar.push(self.error_context_id, "Experiment not yet implemented.")
self.startbutton.set_sensitive(True)
self.stopbutton.set_sensitive(False)
except ValueError:
self.spinner.stop()
self.statusbar.push(self.error_context_id, "Experiment parameters must be integers.")
self.startbutton.set_sensitive(True)
self.stopbutton.set_sensitive(False)
except InputError as e:
self.spinner.stop()
self.statusbar.push(self.error_context_id, e.msg)
self.startbutton.set_sensitive(True)
self.stopbutton.set_sensitive(False)
except SerialException:
self.spinner.stop()
self.statusbar.push(self.error_context_id, "Could not establish serial connection.")
self.startbutton.set_sensitive(True)
self.stopbutton.set_sensitive(False)
except AssertionError as e:
self.spinner.stop()
self.statusbar.push(self.error_context_id, str(e))
finally:
self.startbutton.set_sensitive(False)
self.stopbutton.set_sensitive(True)
self.startbutton.set_sensitive(True)
self.stopbutton.set_sensitive(False)
def experiment_running(self):
try:
......@@ -436,7 +442,9 @@ class main:
self.spinner.stop()
self.startbutton.set_sensitive(True)
self.stopbutton.set_sensitive(False)
def on_pot_stop_clicked(self, data=None):
if self.recv_p:
print "stop"
......
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