aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/Hrs3300.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Hrs3300: fix includes for std::begin/std::endReinhold Gschweicher2024-09-221-0/+1
| | | | | | | | | | | | | | | Fix for Hrs3300 PR about Atomic HRS reads: https://github.com/InfiniTimeOrg/InfiniTime/pull/1845 We use `std::begin` and `std::end`, but we don't include one of the headers that define those functions. See https://en.cppreference.com/w/cpp/iterator/begin for a list of headers that define `std::begin` and `std::end`. Starting with GCC 14 this leads to a compilation error presumably because they cleaned up their headers. Fix code by inlcuding `<iterator>`
* Atomic HRS reads (#1845)mark90642024-09-221-30/+27
| | | | | | | | | | - Combine the reading of all `HRS3300` registers into one I2C read so data is not partial - Downsizes both HRS and ALS to 16bit as the sensor does not generate larger than 16bit values in its current configuration - Increasing the resolution by 1 bit doubles the sensor acquisition time, since we are already at 10Hz we are never going to use a higher resolution - The PPG algorithm buffers for ALS/HRS are already 16bit anyway - Remove functions for setting gain / drive that are unused throughout the codebase - Calculate constants with constexpr
* README: Fix broken URLsVictor Kareh2024-02-251-1/+1
|
* Power optimization - Enable HRS3300 (heart rate sensor) sleep mode.Jean-François Milants2023-06-041-1/+9
| | | | Put the HRS3300 to sleep mode when InfiniTime is going to sleep. This change reduces the power consumption by 130µA when the heart rate sensor is disabled.
* Refactored Ppg for frequency based algorithm. (#1486)Ceimour2023-04-301-10/+14
| | | | | | | New implementation of the heart rate sensor data processing using a frequency based PPG algorithm. The HRS3300 settings are fine-tuned for better signal to noise at 10Hz. The measurement delay is now set to 100ms. Enable and use the ambient light sensor. FFT implementation based on ArduinoFFT (https://github.com/kosme/arduinoFFT, GPLv3.0).
* Update clang-{format,tidy} to 14Finlay Davidson2023-01-041-0/+1
| | | | | Also add configuration options only available in 13 and 14. Fixes warning about -fstack-usage in clang-tidy check.
* Merge pull request #531 from hatmajster/heart-rate-gain-settingJF2022-01-261-2/+2
|\ | | | | Heart rate sensor - HRS gain changed to x8
| * Hrs3300: changed default gain to x8hatmajster2022-01-251-2/+2
| |
* | changed ReadHrs and ReadAls to uint32, and did static_cast instead of hidden ↵Yehoshua Pesach Wallach2021-12-131-2/+2
| | | | | | | | cast when using it
* | order ReadHrs, ReadAls bitwise according to bit orderingYehoshua Pesach Wallach2021-12-131-2/+2
|/
* Move up file header include to topReinhold Gschweicher2021-11-151-1/+1
|
* Update includes to to be relative to src directoryReinhold Gschweicher2021-11-151-1/+1
| | | | | | | Don't use relative imports like `../foo.h` as those depend on the relative position of both files. Rather than that use imports relative to the `src` directory, which explicitly is part of the include directories.
* Reformatted all the files according to clang-format styleAvamander2021-04-241-16/+4
|
* eliminated warnings in Hrs3300Niall Cooling2021-02-121-4/+5
|
* Add License/copyright info in HR related files.Jean-François Milants2021-01-171-1/+9
|
* First implementation of the HR sensor using 100% foss code (ported from waspos)Jean-François Milants2021-01-101-0/+108