8000 HS3003: Removed Unnecessary Code by TheButterMineCutter · Pull Request #3708 · tock/tock · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

HS3003: Removed Unnecessary Code #3708

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

Merged
merged 3 commits into from
Oct 13, 2023
Merged

Conversation

TheButterMineCutter
Copy link
Contributor

Pull Request Overview

This pull request removes unnecessary code from the hs3003.rs.

Testing Strategy

libtock-c example program

TODO or Help Wanted

N/A

Documentation Updated

  • Updated the relevant files in /docs, or no updates are required.

Formatting

  • Ran make prepush.

@alistair23
Copy link
Contributor

Can you please include details in your commits of what you are doing? Why is the current code unnecessary?

@TheButterMineCutter
Copy link
Contributor Author

The code that was removed was not necessary because according to the datasheet, to wake the sensor and make a measurement, you need to send its i2c address with the write bit set. This is already done by calling self.i2c.write(buffer, 1). This also applies to the read part.

Because writing is not necessary to read the sensor data, it was changed to just read().
@bradjc bradjc added this pull request to the merge queue Oct 13, 2023
Merged via the queue into tock:master with commit b232fcc Oct 13, 2023
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.

3 participants
0