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
Mode.cpp
- Committer:
- Bartvaart
- Date:
- 2015-10-12
- Revision:
- 18:eec0880fcded
- Child:
- 19:6c0245063b96
File content as of revision 18:eec0880fcded:
#include "Mode.h"
double mode;
int Mode(double y, double ymax, double thresholdlow, double thresholdmid, double thresholdhigh)
{
if ( y <= thresholdlow){
mode = 1;
}
if (y > thresholdmid && mode == 1){
mode = 2;
}
if (y > thresholdhigh && mode == 1){
mode = 3;
}
return mode;
}