8000 Update adafruit_tlv493d.py by BrianPugh · Pull Request #16 · adafruit/Adafruit_CircuitPython_TLV493D · GitHub
[go: up one dir, main page]

Skip to content

Update adafruit_tlv493d.py #16

New issue

Have a question about this project? Sign up 8000 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

Merged
merged 2 commits into from
Sep 8, 2022
Merged

Update adafruit_tlv493d.py #16

merged 2 commits into from
Sep 8, 2022

Conversation

BrianPugh
Copy link
Contributor

Fixed units in docstring. Alternatively, multiply the returned values by 1000 in _unpack_and_scale to report microteslas (what all the other magnetic sensors from adafruit report).

Fixed units in docstring. Alternatively, multiple the returned values  by 1000 in `_unpack_and_scale` to report microteslas (what all the other magnetic sensors from adafruit report)
@tekktrik tekktrik self-requested a review September 6, 2022 15:08
@BrianPugh
Copy link
Contributor Author

I suppose according to the design guide, changing to microteslas would be better:

https://docs.circuitpython.org/en/7.3.x/docs/design_guide.html#sensor-properties-and-units

@tekktrik
Copy link
Member
tekktrik commented Sep 8, 2022

I'll take a look at this in a couple hours :)

Copy link
Member
@tekktrik tekktrik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, you're right, per the CircuitPython design guide, let's return this in microtesla. So instead you can change just return binval * 98.0 in _unpack_and_scale() and we can give this a major revision update!

@BrianPugh BrianPugh requested a review from tekktrik September 8, 2022 16:59
Copy link
Member
@tekktrik tekktrik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, looks good to me!

@tekktrik tekktrik merged commit 0cf061d into adafruit:main Sep 8, 2022
@BrianPugh
Copy link
Contributor Author

thanks @tekktrik ! Also a little self promotion that you or people at adafruit might find interesting (using this and the other adafruit magnetic sensor drivers):

https://github.com/BrianPugh/magnetometer

adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Sep 9, 2022
Updating https://github.com/adafruit/Adafruit_CircuitPython_TFmini to 1.2.15 from 1.2.14:
  > Merge pull request adafruit/Adafruit_CircuitPython_TFmini#14 from tcfranks/main

Updating https://github.com/adafruit/Adafruit_CircuitPython_TLV493D to 2.0.0 from 1.2.13:
  > Merge pull request adafruit/Adafruit_CircuitPython_TLV493D#16 from BrianPugh/patch-1

Updating https://github.com/adafruit/Adafruit_CircuitPython_asyncio to 0.5.16 from 0.5.15:
  > Merge pull request adafruit/Adafruit_CircuitPython_asyncio#28 from tekktrik/dev/fix-ci
  > Merge pull request adafruit/Adafruit_CircuitPython_asyncio#26 from dedukun/main

Updating https://github.com/adafruit/Adafruit_CircuitPython_HID to 5.3.3 from 5.3.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_HID#104 from adafruit/typing-improvements
  > Merge pull request adafruit/Adafruit_CircuitPython_HID#103 from adafruit/dont-crash-on-full
  > Merge pull request adafruit/Adafruit_CircuitPython_HID#101 from adafruit/fix-import-python3
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 this pull request may close these issues.

2 participants
0