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

sunxi-therm_temp1 temperature in wrong scale #1204

Open
thomas725 opened this issue Jan 28, 2024 · 4 comments
Open

sunxi-therm_temp1 temperature in wrong scale #1204

thomas725 opened this issue Jan 28, 2024 · 4 comments

Comments

@thomas725
Copy link

thomas725 commented Jan 28, 2024

Hi there! I just upgraded the sysinfo dependency from 0.29 to 0.30.5 for my tool and found that on one of my systems it now now finds a component where it previously found none. Sadly the temperature returned is in the wrong scale, returning (for example) 0.028999999165534973 where the function documentation states it should return °C. I believe this needs to be interpreted as the same value times 1000 in °C, so 28.999999165534973°C

The component is called "sunxi-therm temp1" and it's on a RoboRock Q7 Max vacuum cleaning robot flashed with Valetudo firmware.

Is there some way to make your lib interpret it the correct way or do I need to just multiply the value by 1000 in that specific case (and add code to identify that case) on my side?

@thomas725 thomas725 added the bug label Jan 28, 2024
@GuillaumeGomez
Copy link
Owner

Is it an embedded linux?

@thomas725
Copy link
Author

well, kind of I guess you could call it that. It's a vacuum robot, but I've seen much smaller linux machines ;)

@GuillaumeGomez
Copy link
Owner

Well, there was no change to how temperature is computed as far as I can see, so you'll need to debug what's wrong. It's in src/unix/linux/component.rs.

@thomas725
Copy link
Author

Well, I guess it's the same problem as with /sys/class/thermal/thermal_zone*/temp on this system, which gives °C instead of 1000*x°C like most Linux systems I've come across so far.

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

No branches or pull requests

2 participants