Skip to content

Commit

Permalink
added test files, fix RPM reading of file fans
Browse files Browse the repository at this point in the history
  • Loading branch information
markusressel committed Oct 7, 2023
1 parent be35da4 commit 3f4be24
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/fans/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ type FileFan struct {
MovingAvg float64 `json:"movingAvg"`

Pwm int `json:"pwm"`
Rpm int `json:"rpm"`
}

func (fan *FileFan) GetId() string {
Expand Down Expand Up @@ -60,7 +61,7 @@ func (fan *FileFan) GetRpm() (result int, err error) {
return 0, err
}
result = integer
fan.Pwm = result
fan.Rpm = result
return result, err
}

Expand Down
1 change: 1 addition & 0 deletions test/file_fan_pwm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
152
1 change: 1 addition & 0 deletions test/file_fan_rpm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2150
1 change: 1 addition & 0 deletions test/file_sensor
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
50000

0 comments on commit 3f4be24

Please sign in to comment.