Closed blipk closed 1 year ago
A better fix may be to use getTempInfo_json instead, then there doesn't have to be any regex involved, you just have to iterate through the devices and then its sensors to see which device has a sensor labelled "CPU", and filter zeroed values or such like.
Yes would probably be better, I don't think performance is an issue here, but I personally would leave it as is for now and revisit the json parsing when I do my fan curve implementation, since then I will need a better CPU temp reading anyway.
Currently the CPU temp display is more or less gimmicky anyway as it does not actually do anything regarding the fan.
There was a couple of issues with the updated regex from the last PR.
I've updated it to fix issue #5 and it should catch some other edge cases as well
Confirmed fix for provided output on #5:![image](https://user-images.githubusercontent.com/45532845/215254383-65c95d1f-c7a7-49d0-a159-021365267c24.png)
A better fix may be to use
getTempInfo_json
instead, then there doesn't have to be any regex involved, you just have to iterate through the devices and then its sensors to see which device has a sensor labelled "CPU", and filter zeroed values or such like.I'm not sure if the slight performance hit from having to process json will make any difference or not. If you would like me to submit a PR for that I could.