Open WasabiFan opened 8 years ago
Rather than making platform specific power supplies, I would suggest utilizing the scope
attribute (same as the POWER_SUPPLY_SCOPE
property) to find the "System" power supply.
it takes a port parameter, and it seems like if the port is specified it might try to read from a nonexistent attribute
This is a leftover of mass-conversion to pure python I guess. We should change PowerSupply's constructor to a custom one.
Looking through the python library, I can't quite tell what the standard behavior in the PowerSupply is (it takes a port parameter, and it seems like if the port is specified it might try to read from a nonexistent attribute... but I'm not sure). Whatever the case, I am pretty sure that our docs are now wrong:
Should we completely remove this line from the docs? Or add a platform-specific version of this class which defaults to the current platform's power supply? Or maybe just use a wildcard by default for the device name so that it selects the first device it finds?
I'd vote for the last one, but open to suggestions (both based on opinions and current implementation).