Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: QEI biquadFilter mbed
Fork of Demo_TEST by
Diff: main.cpp
- Revision:
- 2:36ad60c0aa01
- Parent:
- 1:5c3259ecf10a
- Child:
- 3:be5ac89a0b53
--- a/main.cpp Thu Oct 18 13:46:33 2018 +0000
+++ b/main.cpp Thu Oct 18 14:16:08 2018 +0000
@@ -60,14 +60,14 @@
double emgNOFilteredL = bq3L.step(emgL.read()); // Filtered HP value of EMG signal left biceps
double emgHPFilteredL = bq2L.step(emgNOFilteredL); // Filtered HP value of EMG signal left biceps
- double emgabsL = abs(emgHPFilteredL); // Absolute value of EMG signal left biceps
- double emgLPFilteredL = bq1L.step(emgabsL); // Filtered HP value of EMG signal left biceps
+ double emgabsL = fabs(emgHPFilteredL); // Absolute value of EMG signal left biceps
+
for(int i = P-1; i >= 0; i--){ // For-loop used for moving average
if (i == 0) {
- A[i] = emgLPFilteredL;
+ A[i] = emgabsL;
}
else {
A[i] = A[i-1];
