Rem0o / FanControl.HWInfo

FanControl plugin to import HWInfo sensors.
MIT License
181 stars 26 forks source link

Unique IDs for ToDirectory and impproved logging of failed sensors #31

Closed chjohans closed 1 year ago

chjohans commented 1 year ago

This seems to work very well, please review and accept if you're OK with my changes.

The ID can never be guaranteed unique, but with my changes, it's as unique as it gets I guess. Works well on my system with a few sensors with identical names and labels, adding the unit type to the ID made it unique.

I'm writing to the log every time a sensor is "lost", or the user will never know, and this is certainly useful info.

I'm also using the ID and not the name, both for logging and in the exception, as this is unique and makes it easier to pinpoint exactly which sensor was missing.

chjohans commented 1 year ago

Both done, I'm a bit rusty with this - your code would be easier to read with some comments :=)