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: HIDScope mbed MODSERIAL QEI
Diff: EMG.cpp
- Revision:
- 16:a2a73d57d556
- Parent:
- 15:a24b30061c5f
--- a/EMG.cpp Wed Nov 01 13:32:43 2017 +0000
+++ b/EMG.cpp Thu Nov 02 15:07:53 2017 +0000
@@ -7,6 +7,7 @@
LoPass( 0.003621682, 0.007243363, 0.003621682, 1.000000000, -1.822694925, 0.837181651)
{
cntr = 0;
+
}
@@ -42,15 +43,17 @@
}
double EMG::filter(){ // Aply all filters and absolute in series in order to get envelope of the EMG signal
-
+
if(cntr<=500)
{
cntr++;
return 0;
}
+
else
{
return get_envelope(get_absolute(get_DC(get_notch(get_noise()))));
+
}
}
@@ -58,4 +61,7 @@
double EMG::get_data(){
return _data;
-}
\ No newline at end of file
+}
+
+
+
