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

fix fan speed in argon-status #33

Merged
merged 1 commit into from
Dec 30, 2022

Conversation

OptimusGREEN
Copy link
Contributor

Fixes #32

error from sys logs:

Dec 30 21:19:58 argoneon sudo[60901]: pam_unix(sudo:session): session closed for user root Dec 30 21:20:00 argoneon python3[60906]: Exception in thread Thread-2 (temp_check): Dec 30 21:20:00 argoneon python3[60906]: Traceback (most recent call last): Dec 30 21:20:00 argoneon python3[60906]: File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner Dec 30 21:20:00 argoneon python3[60906]: self.run() Dec 30 21:20:00 argoneon python3[60906]: File "/usr/lib/python3.10/threading.py", line 953, in run Dec 30 21:20:00 argoneon python3[60906]: self._target(*self._args, **self._kwargs) Dec 30 21:20:00 argoneon python3[60906]: File "/etc/argon/argononed.py", line 252, in temp_check Dec 30 21:20:00 argoneon python3[60906]: setFanSpeed (instantaneous = False) Dec 30 21:20:00 argoneon python3[60906]: File "/etc/argon/argononed.py", line 244, in setFanSpeed Dec 30 21:20:00 argoneon python3[60906]: bus.write_byte(ADDR_FAN,newspeed) Dec 30 21:20:00 argoneon python3[60906]: TypeError: 'float' object cannot be interpreted as an integer

Fixing above error then created this error due to converting string rep of float straight to int:

Traceback (most recent call last): File "/usr/bin/argon-status", line 59, in <module> printTable({"Speed %" : getCurrentFanSpeed()} File "/etc/argon/argononed.py", line 197, in getCurrentFanSpeed return int(speed.read_text()) ValueError: invalid literal for int() with base 10: '30.0'

Copy link
Owner

@JeffCurless JeffCurless left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JeffCurless JeffCurless merged commit 1bd5f46 into JeffCurless:main Dec 30, 2022
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

Successfully merging this pull request may close these issues.

argon-status showing wrong fan speed
2 participants