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
Mode.cpp
- Committer:
- RemcoDas
- Date:
- 2015-10-23
- Revision:
- 47:959ef2792024
- Parent:
- 27:f62e450bb411
- Child:
- 50:16314b798754
File content as of revision 47:959ef2792024:
#include "Mode.h" int Mode(int mode, double y, double thresholdlow, double thresholdmid, double thresholdhigh){ if ( y <= thresholdlow){ mode = 1; } else if (y > thresholdhigh){ mode = 3; } if (y > thresholdmid && mode == 1){ mode = 2; } return mode; }