LaboratoireMecaniqueLille / crappy

Command and Real-time Acquisition Parallelized in Python
https://crappy.readthedocs.io/en/stable/
GNU General Public License v2.0
80 stars 16 forks source link

Fix camera configuration bug and remove duplicate code #114

Closed WeisLeDocto closed 7 months ago

WeisLeDocto commented 7 months ago

As detailed in #113, the camera configuration window currently displays repeatedly an error image in case the Camera object returning the images alternatively returns images or None. This behavior is not the intended one, as the error image should only be displayed once as the very first frame. In case None values are received later, the last acquired image should remain in the interface.

This PR fixes #113. It also removes duplicate code in children of the camera configuration window class, by using ad-hoc helper functions re-defined by the children classes. As a side-effect, this refactoring propagates the fix of d6247ef0 to the children classes. Its propagation had been omitted, due to duplicates in code !