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 MODSERIAL QEI TextLCD mbed
Fork of TotalControlEmg2 by
Diff: Mode.cpp
- Revision:
- 47:959ef2792024
- Parent:
- 27:f62e450bb411
- Child:
- 50:16314b798754
--- a/Mode.cpp Fri Oct 23 10:23:42 2015 +0000 +++ b/Mode.cpp Fri Oct 23 13:37:26 2015 +0000 @@ -1,12 +1,10 @@ #include "Mode.h" -double mode; - -int Mode(double y, double thresholdlow, double thresholdmid, double thresholdhigh){ +int Mode(int mode, double y, double thresholdlow, double thresholdmid, double thresholdhigh){ if ( y <= thresholdlow){ mode = 1; } - if (y > thresholdhigh){ + else if (y > thresholdhigh){ mode = 3; } if (y > thresholdmid && mode == 1){