twVolc / PyCamPermanent

Permanent PiCam (SO2) installation project software
GNU General Public License v3.0
2 stars 2 forks source link

Fixes saving of calibrated images #187

Closed twVolc closed 2 months ago

twVolc commented 2 months ago

Fixes #158

twVolc commented 2 months ago

@ubdbra001 just so that you're aware, I'm anticipating that this will cause a merge conflict with your RTP branch as it has a small update to PyplisWorker.set_processing_directory(), which is something that you've updated for RTP to create directories with dates/times of processing. This shouldn't be a big issue though as all we need to do is make sure that your new code also defines self.saved_img_dir at the end of that method - as below:

self.saved_img_dir = os.path.join(self.processed_dir, 'saved_images')

To optimise code we could also make the directory here (at the moment it's checked twice elsewhere on each iteration loop, and will be made if it doesn't exist, so not the most optimal code but it does the job). I haven't done it like this for the time being as if I make the directory immediately it then messes with this branch's check for if the Processed_X directory is completely empty, so we end up just making a lot of unnecessary Processed_X folders that aren't populated with any data - they just have an empty saved_images folder.