Add License/copyright info in HR related files.
This commit is contained in:
parent
04063cf0af
commit
3a3a14115a
|
@ -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"
|
#include "Biquad.h"
|
||||||
|
|
||||||
using namespace Pinetime::Controllers;
|
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} {
|
Biquad::Biquad(float b0, float b1, float b2, float a1, float a2) : b0{b0}, b1{b1}, b2{b2}, a1{a1}, a2{a2} {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 <vector>
|
||||||
#include <nrf_log.h>
|
#include <nrf_log.h>
|
||||||
#include "Ppg.h"
|
#include "Ppg.h"
|
||||||
using namespace Pinetime::Controllers;
|
using namespace Pinetime::Controllers;
|
||||||
|
|
||||||
|
/** Original implementation from wasp-os : https://github.com/daniel-thompson/wasp-os/blob/master/wasp/ppg.py */
|
||||||
namespace {
|
namespace {
|
||||||
// TODO no vector!
|
|
||||||
int Compare(int* d1, int* d2, size_t count) {
|
int Compare(int* d1, int* d2, size_t count) {
|
||||||
int e = 0;
|
int e = 0;
|
||||||
for(int i = 0; i < count; i++) {
|
for(int i = 0; i < count; i++) {
|
||||||
|
|
|
@ -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 <cmath>
|
||||||
#include "Ptagc.h"
|
#include "Ptagc.h"
|
||||||
|
|
||||||
using namespace Pinetime::Controllers;
|
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} {
|
Ptagc::Ptagc(float start, float decay, float threshold) : peak{start}, decay{decay}, boost{1.0f/decay}, threshold{threshold} {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
/*
|
||||||
|
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 <algorithm>
|
#include <algorithm>
|
||||||
#include <nrf_gpio.h>
|
#include <nrf_gpio.h>
|
||||||
#include "Hrs3300.h"
|
#include "Hrs3300.h"
|
||||||
|
@ -7,7 +13,9 @@
|
||||||
#include <nrf_log.h>
|
#include <nrf_log.h>
|
||||||
|
|
||||||
using namespace Pinetime::Drivers;
|
using namespace Pinetime::Drivers;
|
||||||
|
/** Driver for the HRS3300 heart rate sensor.
|
||||||
|
* Original implementation from wasp-os : https://github.com/daniel-thompson/wasp-os/blob/master/wasp/drivers/hrs3300.py
|
||||||
|
*/
|
||||||
Hrs3300::Hrs3300(TwiMaster &twiMaster, uint8_t twiAddress) : twiMaster{twiMaster}, twiAddress{twiAddress} {
|
Hrs3300::Hrs3300(TwiMaster &twiMaster, uint8_t twiAddress) : twiMaster{twiMaster}, twiAddress{twiAddress} {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user