Finlay Davidson
2b1eae7f59
raisewake: Improve raise to wake algorithm
...
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.
2023-08-17 21:21:22 +02:00
Finlay Davidson
cfe21103ea
motioncontroller: Add functions for analysis
...
These are functions for converting acceleration due to gravity to angles
in degrees, and some statistical analysis including the mean and
variance.
2023-08-17 21:21:22 +02:00
Finlay Davidson
3085bb3990
motioncontroller: Store acceleration history
...
Store history of acceleration values for the y and z axes.
2023-08-17 21:21:22 +02:00
Finlay Davidson
47ca403857
shakewake: Slightly improve accuracy
...
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.
2023-08-17 21:21:22 +02:00
Finlay Davidson
6d5847e046
circularbuffer: Add circular buffer utility struct
2023-08-17 21:21:22 +02:00
Finlay Davidson
505520d83b
arduinofft: Move to submodule, define srqt_internal externally
2023-06-17 17:46:48 +02:00
Finlay Davidson
e4a6f6ad77
fonts: Make patching silent
...
The generate script should only output anything if there are errors.
2023-04-16 15:57:18 +02:00
Finlay Davidson
616aa91b4c
dirtyvalue: Move to src/utility
2023-03-27 22:12:32 +00:00
Finlay Davidson
47931f41d5
staticstack: Move to src/utility
2023-03-27 22:12:32 +00:00
Finlay Davidson
2ba8b17967
linearapproximation: Move to src/utility
2023-03-27 22:12:32 +00:00
Finlay Davidson
e55a76f740
raisewake: Change names in line with the style guide
2023-03-09 10:17:03 +02:00
Finlay Davidson
49ad5be742
motioncontroller: Fix clang-tidy warnings
...
Also move one-line functions to header.
2023-03-09 10:17:03 +02:00
Finlay Davidson
76e79df375
shakewake: Switch to more generic timekeeping
...
Could be used for other motion-based algorithms in the future.
2023-03-09 10:17:03 +02:00
Finlay Davidson
a43463762c
shakewake: Simplify return code
2023-03-09 10:17:03 +02:00
Finlay Davidson
6cf6455313
shakewake: Switch to more generic last* vars
...
These could be used for other motion-based algorithms in the future.
Also fix includes.
2023-03-09 10:17:03 +02:00
Finlay Davidson
f993311830
shakewake: Fix names according to style guide
2023-03-09 10:17:03 +02:00
Finlay Davidson
3b084d74c3
branches: Update files to refer to main instead of develop
2023-03-02 09:45:47 +02:00
Finlay Davidson
d968bcb1f3
docs: Limit number of jobs used for compilation
2023-02-19 20:26:08 +01:00
Finlay Davidson
8b0d888952
batt: Improve discharge curve values
...
Values calculated using multiple tests on 3 PineTimes
2023-01-23 21:48:29 +01:00
Finlay Davidson
96165a8541
Format header files
...
In my PR updating clang-format, I forgot to also format the headers.
2023-01-09 21:41:21 +01:00
Finlay Davidson
3617569795
Add missing clang-format options from version 12
2023-01-04 17:15:33 +01:00
Finlay Davidson
eda96ffadc
Update clang-{format,tidy} to 14
...
Also add configuration options only available in 13 and 14.
Fixes warning about -fstack-usage in clang-tidy check.
2023-01-04 17:15:33 +01:00
Finlay Davidson
fdad3fc985
Fix Docker workflow not pushing on manual trigger
...
Also fix issue where workflow fails on pull requests when the
user who made the pull request doesn't have the secrets set.
Also allow other workflows to be triggered manually.
Also don't trigger any workflows on pull requests to master, as
there shouldn't be any pull requests against master.
2022-07-19 11:53:56 +02:00
Finlay Davidson
358690d08b
Docker workflow use separate username for login
2022-07-09 12:05:46 +02:00
Finlay Davidson
4482078d84
Downgrade GNU Arm Toolchain to 10.3-2021.10
...
This is because of this bug:
https://community.arm.com/support-forums/f/compilers-and-libraries-forum/52623/gcc-11-2-arm-none-eabi-internal-compiler-error-illegal-instruction
It is causing some of the GitHub Actions builds to fail.
2022-07-08 17:18:21 +02:00
Finlay Davidson
27b73470f2
Only build Docker Images on develop, not master
2022-07-08 17:13:47 +02:00
Finlay Davidson
c3bd04f497
Make Docker workflow push to latest and commit sha
2022-07-08 17:13:47 +02:00
Finlay Davidson
1b971eebae
Don't try to cache to Docker Hub on pull request
2022-07-08 17:13:47 +02:00
Finlay Davidson
6a0aec0850
Use either a secret or infinitime as username
...
Uses either the DOCKER_HUB_USERNAME secret or just infinitime as
the username for pushing to and pulling from Docker Hub.
2022-07-08 17:13:47 +02:00
Finlay Davidson
4ee3e51605
Require event_name to be push for Docker Hub
...
Instead of just checking if it's not pull_request
2022-07-08 17:13:47 +02:00
Finlay Davidson
b089fc2c61
Hardcode the Docker Hub username as infinitime
...
This is so that pull requests that modify the docker image but
don't have the DOCKER_HUB_USERNAME secret set won't fail.
2022-07-08 17:13:47 +02:00
Finlay Davidson
373289c072
Be more specific about the compiler version
2022-06-11 22:59:38 +03:00
Finlay Davidson
350bca3965
Replace more instances of old gcc ver
2022-06-11 22:59:38 +03:00
Finlay Davidson
94cd2ba563
Update arm gcc toolchain to 11.2-2022.02
...
Updates the buildAndProgram doc and the docker
image, which means GitHub Actions will also use
the new toolchain.
2022-06-11 22:59:38 +03:00
Finlay Davidson
7f45538eb5
Apply clang-format to all C++ files
2022-06-05 09:15:46 +03:00
Finlay Davidson
718fbdab98
Replace C-style casts with static_cast
2022-06-05 09:15:46 +03:00
Finlay Davidson
0ce4183640
Rename lvgl image files to .c
2022-06-05 09:15:46 +03:00