Skip to content

Commit

Permalink
Fix config levels priority
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanSafonov committed Sep 28, 2024
1 parent 33f5d0b commit 9db7d14
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build-deb.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set -e -x

NAME=fanctl
VERSION=0.1.1
VERSION=0.1.2

TMP_PACKAGE_DIR=.debian
TMP_PACKAGE_DEB_DIR=$TMP_PACKAGE_DIR/DEBIAN
Expand Down
4 changes: 2 additions & 2 deletions internal/service/fan.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ func NewFanDefaults(driver FanDriver, conf config.Fan) FanDefaults {
}

return FanDefaults{
Level: cmp.Or(drvDefaults.Level, conf.Level),
SuspendLevel: cmp.Or(drvDefaults.Level, conf.SuspendLevel),
Level: cmp.Or(conf.Level, drvDefaults.Level),
SuspendLevel: cmp.Or(conf.SuspendLevel, drvDefaults.Level),
Repeat: drvDefaults.Repeat,
DelayUp: cmp.Or(conf.DelayUp, conf.Delay),
DelayDown: cmp.Or(conf.DelayDown, conf.Delay),
Expand Down

0 comments on commit 9db7d14

Please sign in to comment.