matiasandina / FEDWatcher

Software and Hardware to connect FED3 devices over serial on Raspberry Pi 4
MIT License
4 stars 1 forks source link

Add FEDWatcher code to GUI #15

Closed RedSweatshirt closed 3 years ago

RedSweatshirt commented 3 years ago

https://github.com/RedSweatshirt/FEDWatcher/blob/e683a99cb0b6a83140cc3de1e1f1ec4ef4985645/fedwatcher/GUI.py#L196-L229

GUI will need to have to initialize, start, and stop a FEDWatcher object in these commands. The Fedwatcher object can be imported using "from src.fedwatcher import Fedwatcher". Fedwatcher is created and started using

fw = Fedwatcher()
fw.run()

as documented in the Fedwatcher src file.

Upon closing, use fw.stop() or fw.close(). fw.stop() will stop the running fedwatcher without closing the serial ports, in case another different experiment is going to be run. fw.close() stops the running fedwatcher and also closes the serial ports, such as for when the GUI and Fedwatcher are being shut off completely.

matiasandina commented 3 years ago

This is done, however, closing the app hangs, I think there are issues with the way fw.close() is working

https://github.com/RedSweatshirt/FEDWatcher/blob/e487f259683f1e2591cc06c2291d2d2558b5f61a/fedwatcher/GUI.py#L215-L219

matiasandina commented 3 years ago

This is solved!