Closed GuenterQ closed 3 years ago
thats a hex number
thats a hex number
Hello ladyada, sorry, I can't understand what you said. Could you please explain why all checks have failed?
Thank you.
@GuenterQ Checks failed as black is used to verify python code. You can use this guide https://learn.adafruit.com/improve-your-code-with-pylint
Black failed as you are using unnecessary parenthesis here: https://github.com/adafruit/Adafruit_CircuitPython_BNO055/blob/0010961e5df95743423ed7f62d9e0677289f448e/adafruit_bno055.py#L302 and Black is reformatting the file to remove them. On doing that the CI will fail.
What Ladyada is referring to is that this 0x00001111
number looks more like an Hex number that a Binary number.
@GuenterQ Checks failed as black is used to verify python code. You can use this guide https://learn.adafruit.com/improve-your-code-with-pylint
Black failed as you are using unnecessary parenthesis here: https://github.com/adafruit/Adafruit_CircuitPython_BNO055/blob/0010961e5df95743423ed7f62d9e0677289f448e/adafruit_bno055.py#L302
and Black is reformatting the file to remove them. On doing that the CI will fail. What Ladyada is referring to is that this
0x00001111
number looks more like an Hex number that a Binary number.
Hello jposada202020! Thanks a lot!
I noticed the mistake I made. It has been modified.
@GuenterQ just modify your line to
return self._read_register(_MODE_REGISTER) & 0b00001111 # Datasheet Table 4-2
It will pass the CI, at least black 😃
@GuenterQ If you'd like to have this done automatically for you, we've got a guide on running black locally. https://learn.adafruit.com/improve-your-code-with-pylint/black
@dherrada Changes were made by @GuenterQ could you take a look again . thanks :)
This pull request will fix the issue https://github.com/adafruit/Adafruit_CircuitPython_BNO055/issues/79.
Only translate the lower 4 bits of the register OPR_MODE to the operation mode of the sensor.