aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/motion/MotionController.cpp
Commit message (Collapse)AuthorAgeFilesLines
* lowersleep: Improve algorithm by checking wrist angleFintasticMan2024-03-121-6/+18
| | | | Inspired by https://github.com/InfiniTimeOrg/InfiniTime/pull/827#issuecomment-1881580414.
* lowersleep: Implement Lower to Sleep functionality (#827)FintasticMan2023-08-271-0/+14
|
* raisewake: Improve raise to wake algorithmFinlay Davidson2023-08-171-18/+14
| | | | | | | | | | | | | This new algorithm calculates the number of degrees that the wrist has rolled, and checks if that is above a threshold. First it checks if the wrist is still enough for the acceleration values to be considered mostly from gravity. It does this by calculating the mean over the past 2 SystemTask loops, and checking that the variance from that mean is below a threshold. Then it calculates the angle the wrist is being held at, and calculates the difference from the angle some time ago. If this difference is above the threshold, it wakes the watch.
* motioncontroller: Add functions for analysisFinlay Davidson2023-08-171-0/+57
| | | | | | These are functions for converting acceleration due to gravity to angles in degrees, and some statistical analysis including the mean and variance.
* motioncontroller: Store acceleration historyFinlay Davidson2023-08-171-11/+12
| | | | Store history of acceleration values for the y and z axes.
* shakewake: Slightly improve accuracyFinlay Davidson2023-08-171-4/+3
| | | | | | The accumulated speed was calculated by dividing first and multiplying after, which results in more rounding errors than if you multiply first and then divide. The values aren't big enough to overflow.
* ShakeWake: Fixed instant wake after sleep issue in certain positions (#1691)Isaac2023-06-171-1/+2
| | | | | | | | | | | | * ShakeWake: Fixed instant wake after sleep issue in certain positions Add lastX var to track the previous x acceleration for correct calculation of speed. Reorder axes for clarity. --------- Co-authored-by: Isaac <114504394+isaacc27@users.noreply.github.com> Co-authored-by: FintasticMan <52415484+FintasticMan@users.noreply.github.com>
* raisewake: Change names in line with the style guideFinlay Davidson2023-03-091-6/+6
|
* motioncontroller: Fix clang-tidy warningsFinlay Davidson2023-03-091-9/+1
| | | | Also move one-line functions to header.
* shakewake: Switch to more generic timekeepingFinlay Davidson2023-03-091-4/+4
| | | | Could be used for other motion-based algorithms in the future.
* shakewake: Simplify return codeFinlay Davidson2023-03-091-5/+1
|
* shakewake: Switch to more generic last* varsFinlay Davidson2023-03-091-5/+8
| | | | | These could be used for other motion-based algorithms in the future. Also fix includes.
* shakewake: Fix names according to style guideFinlay Davidson2023-03-091-8/+4
|
* Update clang-{format,tidy} to 14Finlay Davidson2023-01-041-0/+3
| | | | | Also add configuration options only available in 13 and 14. Fixes warning about -fstack-usage in clang-tidy check.
* Update clang-tidy configuration and fix some warnings (#1474)Riku Isokoski2022-12-181-3/+2
| | | | | Don't enable coding conventions from unrelated projects. Only enable generic checks.
* Fix crash upon leaving app.Tim Keller2022-01-041-7/+8
| | | | Code formatting
* Better Sensitivity UI, Calibration button addedTim Keller2022-01-041-5/+8
|
* Add averaging to wake threshold. Makes it take more then just a "flick" to ↵Tim Keller2022-01-041-1/+4
| | | | turn on
* Add start of settings app for senstivity.Tim Keller2022-01-041-2/+2
| | | | | really just debugging. I want to make it more configurable then high med low. Position of setting needs a new location...dynamicly adding it currently at the end. Which honestly im fine with.
* Added Shake to wakeTim Keller2022-01-041-2/+18
|
* Ran clang-formatStephanie2021-12-301-5/+11
|
* Renamed confusing variables and general cleanupStephanie2021-12-301-1/+1
|
* Moved trip meter update to MotionController and changed trip meter logicStephanie2021-12-301-0/+4
|
* 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.
* Add MotionService : expose step count and RAW X/Y/Z values to the host.Jean-François Milants2021-10-171-0/+11
|
* Add support for BMA425 acceleration sensor. (#440)JF0022021-06-191-0/+7
| | | * Add support for BMA425 acceleration sensor.
* Handle return code from BMA driver, and set a flag is the initialization ↵Jean-François Milants2021-04-041-0/+3
| | | | fails. This allows to boot InfiniTime even if the device cannot initialize.
* First integration of the motion sensor (bma 421) : step counting + wake on ↵Jean-François Milants2021-04-041-0/+33
wrist rotation + app to see the value of the 3 axis in "real time".