Calling eprx_group_status runs into TypeErrors: 'type' + 'int' - an int group_id is being added to a class EPRX0CONTROL
I set up the library to work with smbus2 as the i2c backend. To confirm that the library works I call LpgbtV0(...).read_mode()
method. It works fine and returns the correct mode. But .eprx_group_status(0)
runs into errors like this one:
.../lpgbt.py", line 969, in eprx_group_status
control_reg = self.read_reg(self.EPRX0CONTROL + group_id)
TypeError: unsupported operand type(s) for +: 'type' and 'int'
There is a class and an int EPRX0CONTROL
in lpgbt_register_map_v0.py
(and v1). The int does look like an address. And it is accessible with self.Reg.EPRX0CONTROL
. So, I changed the 969 line in lpgbt.py
like this. Now the same error happens further in the method:
.../lpgbt.py", line 994, in eprx_group_status
locked_reg = self.read_reg(self.EPRX0LOCKED + 3 * group_id)
TypeError: unsupported operand type(s) for +: 'type' and 'int'
Could you check what should be done here? Should I just use self.Reg.
to get these registers? If so, I could patch this up and open a merge request.