Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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))
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))
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)
def _get_float(self, command):
"""Get float value with `command`."""
return linear_to_float(self._exec(WriteBit.READ, command)[2:])