diff --git a/vitals_helper.py b/helpers/vitals_helper.py similarity index 100% rename from vitals_helper.py rename to helpers/vitals_helper.py diff --git a/main.pyw b/main.pyw index 1d26fc6..2377d9b 100644 --- a/main.pyw +++ b/main.pyw @@ -19,12 +19,12 @@ import globals from styles import Labels if globals.os == "Windows": from helpers.liquidctl_helper_windows import LiquidCTL_Helper - from vitals_helper import VitalsHelperWindows as VitalsHelper + from helpers.vitals_helper import VitalsHelperWindows as VitalsHelper import win32mica # type: ignore import darkdetect # type: ignore elif globals.os == "Linux": from helpers.liquidctl_helper_linux import LiquidCTL_Helper - from vitals_helper import VitalsHelperLinux as VitalsHelper + from helpers.vitals_helper import VitalsHelperLinux as VitalsHelper class MainWindow(QMainWindow): @@ -121,17 +121,17 @@ class MainWindow(QMainWindow): """ Update widgets using LiquidCTL library.""" # Platform Specific Widgets ####################################################### - if globals.platform == "Windows": + if globals.os == "Windows": self.__vitals_helper() - elif globals.platform == "Linux": + elif globals.os == "Linux": self.lbl_value_prg_cpu_temp.setText( self.min_max_cur_cpu_temp.builder( self.__vitals_helper.get_temps( - self.__vitals_helper.Component.lin_cpu_amd), "°C")) + self.__vitals_helper.HWSensor.lin_cpu_amd), "°C")) self.prg_cpu_temp.setValue( self.__vitals_helper.get_temps( - self.__vitals_helper.Component.lin_cpu_amd)) + self.__vitals_helper.HWSensor.lin_cpu_amd)) # Cross Platform Widgets ########################################################## self.lbl_device_name.setText( @@ -158,7 +158,7 @@ class MainWindow(QMainWindow): self.min_max_cur_pumpspeed.builder( self._lctl.device_pumpSpeed, " rpm")) - if self._lctl.device_fwVers is not None: + if len(self._lctl.device_fwVers) > 0: self.lbl_fwvers.setText(f"Firmware: v{self._lctl.device_fwVers}")