Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

TheButterMineCutter
Copy link
Contributor

Pull Request Overview

This pull request adds a few things :

  • New State to check if there exists good communication with Sensor
  • Sensor now goes into One Shot Mode, which after taking a reading, turns off to save power

Testing Strategy

Board - Nano 33 BLE Sense Rev2
Application - libtock-c program which simply calls pressure_read_sync(&press)

TODO or Help Wanted

The call to pressure_read_sync(&press) only returns data when :

Ok(pressure_value) => (kernel::errorcode::into_statuscode(Ok(())), pressure_value as usize, 0)

Is changed to :

Ok(pressure_value) => (pressure_value as usize, kernel::errorcode::into_statuscode(Ok(())), 0)

I think that the C API for pressure readings must be changed to accommodate this. You can find it here tock/libtock-c#351

Documentation Updated

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

Formatting

  • Ran make prepush.

TheButterMineCutter and others added 2 commits November 24, 2023 21:27
Before, the capsule was kind of buggy and was not returning the right value. These changes include adding new states which read status registers to see if a reading is ready.
bradjc
bradjc previously approved these changes Nov 27, 2023
@bradjc bradjc added this pull request to the merge queue Dec 1, 2023
Merged via the queue into tock:master with commit 3f2d0c5 Dec 1, 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.

2 participants