Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HW Info Sensors missing decimal #20

Open
Boeng01 opened this issue May 10, 2022 · 7 comments
Open

HW Info Sensors missing decimal #20

Boeng01 opened this issue May 10, 2022 · 7 comments

Comments

@Boeng01
Copy link

Boeng01 commented May 10, 2022

I just updated FanControl to 1.13 and realized that the old hwinfo plugin (shared memory) didn't work any more. So i pulled the new one here, which works over the gadget implementation. In principle it works, but all sensors are missing the decimal point.

So a sensor is shown in hwinfo as 26.1°C and reported in fancontrol as 261°C. That is true for all sensors that are reported by hwinfo.

Any help to fix this would be appreciated :)

Thanks for your work, When it's working, this is by far the best solution to control fans over sensor readings.

@Boeng01
Copy link
Author

Boeng01 commented May 10, 2022

I just found a temporary solution by limiting the decimals in hwinfo to 0. Loosing some granularity here now but to control fans its more than enough to get full °C.

Anyway, something's not right here. maybe you could look into it?

Thanks

@Rem0o
Copy link
Owner

Rem0o commented May 10, 2022

Seems like a culture issue. Comma versus dot for decimals.

I'm using float.Parse but it seems like it doesn't work on all cultures.

@Boeng01
Copy link
Author

Boeng01 commented May 11, 2022

i thought something similar. Sadly there's no option in HWinfo to change the seperator so there's no way for me as a user to fix this.
Maybe you can wrap your head around this for a future version?

Anyway, it's working good enough with full degrees, like i said. So no hurry ;)

Thanks for replying.

@permissionBRICK
Copy link

Same issue, except it only occurs sometimes. When I start or restart Fancontrol, the right value for my AIO Temp is delivered (eg 28,4 C), but after a miute or two sometimes it breaks, and now the value is 28453 or similar)
I have an english install, but am using german culture settings.

@permissionBRICK
Copy link

Also this seems recent, I haven't updated this plugin since I recompiled it, but it seems like either a Fancontrol, hwinfo or windows update broke this in the last 2 weeks, it was working before

@Rem0o
Copy link
Owner

Rem0o commented May 18, 2022

@permissionBRICK I released a "1.1" version of the plugin.

make sure you got the latest HWInfo version, and use the gadget stuff instead of shared memory.

@xmikedanielsx
Copy link

Seems like a culture issue. Comma versus dot for decimals.

I'm using float.Parse but it seems like it doesn't work on all cultures.

Could use something like

var numberFormat = us.NumberFormat;
string decimalSeparator = numberFormat.NumberDecimalSeparator;
string thousandsSeparator = numberFormat.NumberGroupSeparator;

Then before parsing you could Check the separator for the locale and then
string.Replace(decimalSeparator , myExpectedDecimalSep).Replace(thousandsSeparator , myEexpectedThousSep)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants