diff --git a/lib/apds9960/apds9960/exceptions.py b/lib/apds9960/apds9960/exceptions.py index b297e3b1..8e98e1ae 100644 --- a/lib/apds9960/apds9960/exceptions.py +++ b/lib/apds9960/apds9960/exceptions.py @@ -1,9 +1,9 @@ class APDS9960InvalidDevId(ValueError): - def __init__(self, id, valid_ids): + def __init__(self, device_id, valid_ids): Exception.__init__( self, "Device id 0x{} is not a valid one (valid: {})!".format( - format(id, "02x"), + format(device_id, "02x"), ", ".join(["0x{}".format(format(i, "02x")) for i in valid_ids]), ), ) diff --git a/lib/bq27441/bq27441/device.py b/lib/bq27441/bq27441/device.py index 83a5150e..cba16a54 100644 --- a/lib/bq27441/bq27441/device.py +++ b/lib/bq27441/bq27441/device.py @@ -469,10 +469,10 @@ def reset(self): def soft_reset(self): return self.execute_control_word(BQ27441_CONTROL_SOFT_RESET) - # Read a 16 - bit command word from the BQ27441-G1A, def format = little endian int16 - def read_word(self, sub_address, format="