How to use the liquidctl.pmbus.linear_to_float function in liquidctl

To help you get started, we’ve selected a few liquidctl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jonasmalacofilho / liquidctl / liquidctl / driver / seasonic.py View on Github external
def _get_float(self, cmd, page=None):
        if page is None:
            return linear_to_float(self._exec_read(cmd, 2))
        else:
            return linear_to_float(self._exec_page_plus_read(page, cmd, 2))
github jonasmalacofilho / liquidctl / liquidctl / driver / seasonic.py View on Github external
def _get_float(self, cmd, page=None):
        if page is None:
            return linear_to_float(self._exec_read(cmd, 2))
        else:
            return linear_to_float(self._exec_page_plus_read(page, cmd, 2))
github jonasmalacofilho / liquidctl / liquidctl / driver / seasonic.py View on Github external
def _get_vout(self, rail):
        mode = self._exec_page_plus_read(rail, CMD.VOUT_MODE, 1)[0]
        assert mode >> 5 == 0 # assume vout_mode is always ulinear16
        vout = self._exec_page_plus_read(rail, CMD.READ_VOUT, 2)
        return linear_to_float(vout, mode & 0x1f)
github jonasmalacofilho / liquidctl / liquidctl / driver / corsair_hid_psu.py View on Github external
def _get_float(self, command):
        """Get float value with `command`."""
        return linear_to_float(self._exec(WriteBit.READ, command)[2:])