Commit Graph

24 Commits

Author SHA1 Message Date
bc2a9fe87d
Set default log level and initialize logger before load config 2021-08-04 14:13:30 +02:00
Adrian Woźniak
a527f7396e
Replace len() < 1 with is_empty() 2021-08-02 10:21:11 +02:00
Stefan Gehr
0539f0b515 Workaround for service starting before hwmon paths
Let the service fail when there are no hwmon paths yet.
2021-08-02 00:08:04 +02:00
Stefan Gehr
35532b1eb7 Simplifications and fixes for edge cases
monitor.rs: Removed hardcoded pwm-range of 0 to 255 and instead
correctly interpolate between pwm_min() and pwm_max()
main.rs: Simpler comparison to check whether temperature changed since
last time
hw_mon.rs: Removed unnecessary conversions between u32 and u64
2021-08-02 00:02:03 +02:00
Adrian Woźniak
c5f968fcf9
Move hw_mod to own file. 2021-07-31 22:42:58 +02:00
Adrian Woźniak
365c58ff37
Move errors to own file. Move monitor to own file. 2021-07-31 22:40:57 +02:00
Adrian Woźniak
8c5fa618c3
Refactor after review 2021-07-31 22:33:32 +02:00
6eeeb3a487
Update src/main.rs
Co-authored-by: Richard Kuhnt <r15ch13+git@gmail.com>
2021-07-31 20:34:41 +02:00
73369978ca
Update src/main.rs
Co-authored-by: Richard Kuhnt <r15ch13+git@gmail.com>
2021-07-31 20:33:45 +02:00
Adrian Woźniak
cfa9867e3d
Refactor, fix broken resolve conflicts, add verbose monitor, skip update speed if temp didn't changed. 2021-07-30 21:34:31 +02:00
20214db390
Update main.rs 2021-07-29 10:32:21 +02:00
e9985d50b5
Update main.rs 2021-07-29 10:28:13 +02:00
c54bdc0af0
Update main.rs 2021-07-29 10:21:26 +02:00
fe2ed25ff7
Merge branch 'main' into main 2021-07-29 10:10:19 +02:00
Richard Kuhnt
cbe1203fb0 Use .unwrap_or_default() in pwm_min/fan_min 2021-07-28 21:07:00 +02:00
Stefan Gehr
6b17d3815f Use pwm_min, pwm_max for converting speed to pwm
Don't hardcode 0 and 255 anymore. Instead use pwm_min and pwm_max as
boundaries when converting from a speed (0 to 100) to a pwm value.
0 gets mapped to pwm_min, 100 gets mapped to pwm_max everything inbetween
gets linearly interpoltated.
2021-07-20 09:53:22 +02:00
Stefan Gehr
90e212a158 Fanspeeds as floats, 0 is lowest speed, bugfixes
1. The fanspeeds can now be specified as floats for better granularity
2. Removed 4 as the lowest possible speed. Lowest possible value is now 0.0
3. min and max values are now correctly read for pwm1 and not the rpm
   values of fan1 anymore
4. Percentage speed now gets correctly converted to the pwm values
   (usually between 0 and 255)
5. Before the update of the pwm-value was skipped when the current speed
   was below minimum or above maximum. This got removed. Why was that
   there in the first place?
6. Simpler algorithm for speed_for_temp
7. in monitor the min value is now actually below MIN and the max value
   below MAX. Before it was swapped
8. Fixed grammar error "can's" instead of "can't"
2021-07-19 22:25:34 +02:00
Richard Kuhnt
56b5ff2f89 Convert speed value from config to PWM 2021-07-19 19:20:47 +02:00
Richard Kuhnt
73a0a4d7fc Compare target pwm value to pwm1_min and pwm1_max instead of fan rpm
- Add PWM values to monitor
2021-07-19 17:12:55 +02:00
Adrian Woźniak
408b5864cd
Test parse card0, move checking vendor 2021-07-04 00:09:20 +02:00
Adrian Woźniak
b39057c243
Add print version 2021-07-03 23:34:22 +02:00
Aurorans Solis
6ba79825c9 Made suggested edits. 2021-07-02 15:37:05 -07:00
Aurorans Solis
04b828ab6c Filter out non-AMD cards. 2021-07-02 10:26:32 -07:00
Adrian Woźniak
8ce6bf86a1
Initial 2021-07-02 13:36:36 +02:00