Total control sjoel robot
Dependencies: HIDScope MODSERIAL QEI TextLCD mbed
Mode.cpp
- Committer:
- Bartvaart
- Date:
- 2015-10-13
- Revision:
- 19:6c0245063b96
- Parent:
- 18:eec0880fcded
- Child:
- 27:f62e450bb411
File content as of revision 19:6c0245063b96:
#include "Mode.h" double mode; int Mode(double y, double ymax, double thresholdlow, double thresholdmid, double thresholdhigh) { if ( y <= thresholdlow){ mode = 1; } if (y > thresholdhigh){ mode = 3; } if (y > thresholdmid && mode == 1){ mode = 2; } return mode; }