Skip to content

Sensor reading do not round values, they cut fractional part off instead. #813

@rud01f

Description

@rud01f

Is your feature request related to a problem? If so, please describe the problem.
It's related to LibreHardwareMonitor library, which returns most of values with big granularity (fractional part). The current code "cuts" the fractional part of readed value (int(value)) instead of rounding it (round(value)). The result is that on 0.9% CPU usage Turing Smart Screen still displays 0% instead of rounding it up to 1%.

Describe the feature / solution to your problem you'd like
As I stated above, requesting dear @mathoudebine to use round(value) instead of int(value).

Describe alternatives you've considered / and or tested
None that come up to my mind.

Screenshots / photos & mockups of the Turing screen
none would help

Environment:

  • Turing Smart Screen Python v. 3.9.3 master branch
  • Windows 11, precisely LibreHardwareMonitorLib way of reading sensors (not sure if applies to python readings method)
  • Python 3.13
  • (not sure if matters) AMD Ryzen 5 5500 CPU, AMD Raden RX 6600 GPU

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions