Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some registers are not in the definitiions file. #8

Open
momo2555 opened this issue Feb 24, 2022 · 2 comments · May be fixed by #12
Open

Some registers are not in the definitiions file. #8

momo2555 opened this issue Feb 24, 2022 · 2 comments · May be fixed by #12

Comments

@momo2555
Copy link

Hi,
I noticed that GYRO_OFFSET_EN, GYR_OFFSET_X_MSB_LEN, GYR_OFFSET_X_MSB_BIT ... are not in the definitions file. the same for gyro y and z. So it generates an error when you call the functions to get the offsets.

Mohamed

@momo2555 momo2555 changed the title Some registers are not in definitiions file. Some registers are not in the definitiions file. Feb 24, 2022
@pastaq
Copy link

pastaq commented Jun 6, 2022

Additional registers are missing

File "/home/gamer/gyro-test.py", line 48, in capture_events
    print(device.get_gyro_rate(), device.get_accel_rate())
  File "/home/gamer/.local/lib/python3.10/site-packages/BMI160_i2c/__init__.py", line 136, in get_accel_rate
    return self._reg_read_bits(registers.ACCEL_CONF, definitions.ACCEL_RATE_SEL_BIT, definitions.ACCEL_RATE_SEL_LEN)
AttributeError: module 'BMI160_i2c.definitions' has no attribute 'ACCEL_RATE_SEL_BIT'. Did you mean: 'ACCEL_RANGE_SEL_BIT'?

@larsll
Copy link
Contributor

larsll commented Sep 18, 2022

The values can be found here; https://github.com/hanyazou/BMI160-Arduino/blob/master/BMI160.h - I will look at reviewing and updating accordingly.

@larsll larsll linked a pull request Sep 18, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants