Skip to content

Commit

Permalink
fix init fans
Browse files Browse the repository at this point in the history
  • Loading branch information
honjow committed Apr 12, 2024
1 parent 52d4a43 commit a862e6f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion backend/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,14 @@ def parse_fan_configuration(self):
fan_config.FAN_HWMON_INPUT_PATH = name_path_map[fan_hwmon_label_input]+"/"+fan_pwm_input["pwm_read_path"]
fan_config.fan_value_max = fan_pwm_input["pwm_read_max"] if "pwm_read_max" in fan_pwm_input else 0
max_value_from_settings = self.settings.getSetting(f"fan{len(self.fan_config_list)}_max")
fan_config.FAN_RPMVALUE_MAX = max_value_from_settings if max_value_from_settings > fan_config.fan_value_max else fan_config.fan_value_max
fan_config.FAN_RPMVALUE_MAX = (
max_value_from_settings
if (
max_value_from_settings != None
and max_value_from_settings > fan_config.fan_value_max
)
else fan_config.fan_value_max
)
fan_config.TEMP_MODE = hwmon_config["temp_mode"]
self.fan_config_list.append(fan_config)
except:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "PowerControl",
"version": "2.4.16",
"version": "2.4.17",
"description": "PowerControl plugin.",
"scripts": {
"build": "shx rm -rf dist && rollup -c",
Expand Down

0 comments on commit a862e6f

Please sign in to comment.