Bug 411226 - Temperature shown to 6 decimal places in SMART Status
Summary: Temperature shown to 6 decimal places in SMART Status
Status: RESOLVED FIXED
Alias: None
Product: partitionmanager
Classification: Applications
Component: general (other bugs)
Version First Reported In: 4.0.0
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Andrius Štikonas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-24 01:09 UTC by Unknown
Modified: 2019-10-05 11:19 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Image of the described bug. (31.73 KB, image/png)
2019-08-24 01:09 UTC, Unknown
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Unknown 2019-08-24 01:09:02 UTC
Created attachment 122310 [details]
Image of the described bug.

SUMMARY
The temperature that is seen in the SMART status dialogue on storage devices is too accurate and almost always displays it with 6 zeros, e.g. 22.000000*C. This should be changed to a more reasonable accuracy.

STEPS TO REPRODUCE
1. Right Click on a device > Smart Status
2. Look at 'Temperature' 

OBSERVED RESULT
Shown 6 decimal places of temperature - see attachment.

EXPECTED RESULT
Shown to one or two decimal places - I'm not sure accurate most temperature meters are on drives are, but both of mine are only accurate to the nearest degree.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Shubham 2019-09-01 17:41:58 UTC
Git commit 78f29ae8b5323c6ba6ea9198261fa9aa0c9f6dd9 by Shubham Jangra.
Committed on 01/09/2019 at 17:41.
Pushed by shubham into branch 'master'.

Reduce temperature's precision from six decimal places to two

Summary: BUG: 411226

Test Plan: I couldn't test it since my device does not support SMART

Reviewers: stikonas

Reviewed By: stikonas

Subscribers: #kde_partition_manager

Tags: #kde_partition_manager

Differential Revision: https://phabricator.kde.org/D23572

M  +1    -1    src/core/smartstatus.cpp

https://invent.kde.org/kde/kpmcore/commit/78f29ae8b5323c6ba6ea9198261fa9aa0c9f6dd9
Comment 2 Unknown 2019-09-07 01:31:44 UTC
Tested this and it's working fine.
Slight correction: this is significant figures not decimal places
(https://doc.qt.io/qt-5/qstring.html#argument-formats)
Comment 3 Andrius Štikonas 2019-09-07 10:13:15 UTC
(In reply to Mathew from comment #2)
> Tested this and it's working fine.
> Slight correction: this is significant figures not decimal places
> (https://doc.qt.io/qt-5/qstring.html#argument-formats)

Shall we use 'f', 0 ? 'g' has disadvantage that it switches to scientific notation...
Comment 4 Unknown 2019-09-07 10:24:07 UTC
I think so.

Another reason why we should is that 100F≈38C, and at that point, two significant figures will be rounded the Fahrenheit value.
Comment 5 Andrius Štikonas 2019-09-07 12:15:04 UTC
Git commit 4b0261230de9a0864cb457a59d6c83902c675ac6 by Andrius Štikonas.
Committed on 07/09/2019 at 10:51.
Pushed by stikonas into branch 'master'.

Make S.M.A.R.T. disk temperature label show only integers.

M  +1    -1    src/core/smartstatus.cpp

https://invent.kde.org/kde/kpmcore/commit/4b0261230de9a0864cb457a59d6c83902c675ac6
Comment 6 Andrius Štikonas 2019-10-05 11:19:03 UTC
Git commit a264a282372b0ed44122bcfcff75702512d2c57f by Andrius Štikonas, on behalf of Shubham Jangra.
Committed on 05/10/2019 at 11:07.
Pushed by stikonas into branch '4.0'.

Reduce temperature's precision from six decimal places to two

Summary: BUG: 411226

Test Plan: I couldn't test it since my device does not support SMART

Reviewers: stikonas

Reviewed By: stikonas

Subscribers: #kde_partition_manager

Tags: #kde_partition_manager

Differential Revision: https://phabricator.kde.org/D23572

M  +1    -1    src/core/smartstatus.cpp

https://invent.kde.org/kde/kpmcore/commit/a264a282372b0ed44122bcfcff75702512d2c57f
Comment 7 Andrius Štikonas 2019-10-05 11:19:03 UTC
Git commit df235a77517709d211d029234cf6c8893b4aa131 by Andrius Štikonas.
Committed on 05/10/2019 at 11:07.
Pushed by stikonas into branch '4.0'.

Make S.M.A.R.T. disk temperature label show only integers.

M  +1    -1    src/core/smartstatus.cpp

https://invent.kde.org/kde/kpmcore/commit/df235a77517709d211d029234cf6c8893b4aa131