-
Notifications
You must be signed in to change notification settings - Fork 236
Aquacomputer driver enhancements #489
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
Conversation
As far as I can see I didn't change anything that would upset the keyval test... |
I think we just experienced a corruption of the Python interpreter. The assertion failure, if I read it correctly, was caused by in that specific run a method call assert store.load(...) == 2 somehow becoming a method reference, turning the assertion in memory to something like assert store.load == 2 which obviously is false. Anyway, I restarted the job and then it completed fine. |
@@ -93,7 +93,7 @@ def initialize(self, **kwargs): | |||
""" | |||
|
|||
fw = self.firmware_version | |||
serial_number = self.serial_number | |||
serial_number = self._serial_number |
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.
Shouldn't this be self._serial
? And how isn't this tripping the tests?
Also, needing two reads in the normal path (which is to call initialize
first) isn't ideal, even if the interval between reports is fairly short.
I think it would be better if the properties used a shared _read_device_statics
(or something like it) method to parses both fields from a single _read
.
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.
self._serial
is where the serial number gets stored from within the self._serial_number
property (currently), it would be empty on its own.
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.
Oh, yeah, of course!
Thanks! |
For
aquacomputer.py
, make serial number property private and read that and firmware version only when they are requested, but not already cached.Related: #482
Checklist:
liquidctl.8
Linux/Unix/Mac OS man pagedocs/*guide.md
device guidesNew CLI flag?
extra/completions/
New device?
extra/linux/71-liquidctl.rules
(instructions in the file header)en
)New driver?
docs/developer/protocol/