diff options
author | Jean-François Milants <jf@codingfield.com> | 2021-01-17 16:33:45 +0100 |
---|---|---|
committer | Jean-François Milants <jf@codingfield.com> | 2021-01-17 16:33:45 +0100 |
commit | 3a3a14115a81b9dd2c6f839c0ad1b14d04367642 (patch) | |
tree | 1d3572d42e872a0f6151a2d2c5acfdcb19c96643 /src/components/heartrate | |
parent | 04063cf0af29e09946bf3d1fa77ae91235cd8b84 (diff) |
Add License/copyright info in HR related files.
Diffstat (limited to 'src/components/heartrate')
-rw-r--r-- | src/components/heartrate/Biquad.cpp | 7 | ||||
-rw-r--r-- | src/components/heartrate/Ppg.cpp | 8 | ||||
-rw-r--r-- | src/components/heartrate/Ptagc.cpp | 7 |
3 files changed, 21 insertions, 1 deletions
diff --git a/src/components/heartrate/Biquad.cpp b/src/components/heartrate/Biquad.cpp index 37b3ba67..6a4b8181 100644 --- a/src/components/heartrate/Biquad.cpp +++ b/src/components/heartrate/Biquad.cpp @@ -1,7 +1,14 @@ +/* + SPDX-License-Identifier: LGPL-3.0-or-later + Original work Copyright (C) 2020 Daniel Thompson + C++ port Copyright (C) 2021 Jean-François Milants +*/ + #include "Biquad.h" using namespace Pinetime::Controllers; +/** Original implementation from wasp-os : https://github.com/daniel-thompson/wasp-os/blob/master/wasp/ppg.py */ Biquad::Biquad(float b0, float b1, float b2, float a1, float a2) : b0{b0}, b1{b1}, b2{b2}, a1{a1}, a2{a2} { } diff --git a/src/components/heartrate/Ppg.cpp b/src/components/heartrate/Ppg.cpp index 27617c15..233c3003 100644 --- a/src/components/heartrate/Ppg.cpp +++ b/src/components/heartrate/Ppg.cpp @@ -1,10 +1,16 @@ +/* + SPDX-License-Identifier: LGPL-3.0-or-later + Original work Copyright (C) 2020 Daniel Thompson + C++ port Copyright (C) 2021 Jean-François Milants +*/ + #include <vector> #include <nrf_log.h> #include "Ppg.h" using namespace Pinetime::Controllers; +/** Original implementation from wasp-os : https://github.com/daniel-thompson/wasp-os/blob/master/wasp/ppg.py */ namespace { - // TODO no vector! int Compare(int* d1, int* d2, size_t count) { int e = 0; for(int i = 0; i < count; i++) { diff --git a/src/components/heartrate/Ptagc.cpp b/src/components/heartrate/Ptagc.cpp index 9302af97..dd7c4411 100644 --- a/src/components/heartrate/Ptagc.cpp +++ b/src/components/heartrate/Ptagc.cpp @@ -1,8 +1,15 @@ +/* + SPDX-License-Identifier: LGPL-3.0-or-later + Original work Copyright (C) 2020 Daniel Thompson + C++ port Copyright (C) 2021 Jean-François Milants +*/ + #include <cmath> #include "Ptagc.h" using namespace Pinetime::Controllers; +/** Original implementation from wasp-os : https://github.com/daniel-thompson/wasp-os/blob/master/wasp/ppg.py */ Ptagc::Ptagc(float start, float decay, float threshold) : peak{start}, decay{decay}, boost{1.0f/decay}, threshold{threshold} { } |