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

Temperature API #451

Merged
merged 12 commits into from
Feb 7, 2023
Merged

Temperature API #451

merged 12 commits into from
Feb 7, 2023

Conversation

alexandruCarp
Copy link
Contributor

@alexandruCarp alexandruCarp commented Jan 12, 2023

Pull Request Overview

This pull request adds:

  • a Temperature API, similar to the libtock-c version. The API provides a function that simulates a synchronous temperature reading and also functions to initiate a reading, register/ unregister a listener and check for driver existence.
  • an example app which samples the temperature sensor every 2 seconds and prints the measured temperature.
  • a fake temperature driver, for testing purposes.
  • unit tests for the fake driver and for the user space library

Testing Strategy

This pull request was tested with the unit tests and by running the example app on a microbit v2 board.

TODO or Help Wanted

Feedback is much appreciated.

Documentation Updated

  • no updates are required.

Cargo.toml Outdated Show resolved Hide resolved
unittest/src/fake/temperature/mod.rs Outdated Show resolved Hide resolved
unittest/src/fake/temperature/mod.rs Outdated Show resolved Hide resolved
examples/temperature.rs Outdated Show resolved Hide resolved
apis/temperature/src/lib.rs Show resolved Hide resolved
alexandruCarp and others added 2 commits February 5, 2023 22:22
Co-authored-by: Alexandru Radovici <msg4alex@gmail.com>
@alexandruradovici
Copy link
Contributor

@jrvanwhy I think this is ready to be merged.

Copy link
Collaborator

@jrvanwhy jrvanwhy left a comment

Choose a reason for hiding this comment

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

bors r+

@bors
Copy link
Contributor

bors bot commented Feb 7, 2023

Build succeeded:

@bors bors bot merged commit b479038 into tock:master Feb 7, 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.

None yet

3 participants