Skip to content

FIX: Temp Control Issue & Refactor

Matt Joyce requested to merge Peltier_Temp_Control_Fix into DEV

Created by: ryansantos1174

Refactor Peltier Controller code to remove threading from functions. I believe that the threading paired with the RS232 Serial connection lead to unexpected crashes and signals being mixed up before being sent to the controller. Within Peltier.py, I removed the extra classes and now only have PeltierSignalGenerator. This helps modularize the code. Any functions that can be generally used to communicate with the controller are in Peltier.py and all other functions that are specific to GUI needs are inside PeltierCoolingApp.py.

To test that the new code works, I ran the PeltierCoolingApp.py by itself which caused no crashes and controlled the temperature correctly. I also ran the full GUI and the Peltier module runs as expected there as well. While temperature and power monitoring are the "Connect all devices" button also works within the main GUI.

Merge request reports