-
-
Notifications
You must be signed in to change notification settings - Fork 126
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
Prevent transient error messages where no temperature is provided #428
base: development
Are you sure you want to change the base?
Conversation
Signed-off-by: Rob Gill <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR:
Could you also please change L435/437 to show N/A
. I think showing °?
in case no data is returned at all is not the best solution.
Align printf text padding to account for presence/absence of unicode degree symbol Signed-off-by: Rob Gill <[email protected]>
Changing it to N/A required further adjustment. The spacings originally present are assuming the presence of a multibyte unicode ° symbol. As printf's padding counts bytes, not characters (https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap05.html#tag_05) this throws the column alignment off if there is no degree symbol. It turns out this was also effecting the spacing if the units were set to Kelvins. |
Thanks for being that precise. I'd like to group similar things together, please put all the padding calculation into |
Signed-off-by: Rob Gill <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: Rob Gill <[email protected]>
It now clears the flags explicitly, so won't misalign if units change on the fly. |
What does this PR aim to accomplish?:
Prevent transient error messages on refresh where hardware temperature is not reported under v6.
How does this PR accomplish the above?:
Avoids attempts to calculate from a null value. Existing mechanism to indicate unknown units is used.
By submitting this pull request, I confirm the following:
git rebase
)