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@27:f62e450bb411, 2015-10-16 (annotated)
- Committer:
- RemcoDas
- Date:
- Fri Oct 16 12:37:26 2015 +0000
- Revision:
- 27:f62e450bb411
- Parent:
- 19:6c0245063b96
- Child:
- 47:959ef2792024
Dubbele kalibratie toegevoegd
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Bartvaart | 18:eec0880fcded | 1 | #include "Mode.h" |
Bartvaart | 18:eec0880fcded | 2 | |
Bartvaart | 18:eec0880fcded | 3 | double mode; |
Bartvaart | 18:eec0880fcded | 4 | |
RemcoDas | 27:f62e450bb411 | 5 | int Mode(double y, double thresholdlow, double thresholdmid, double thresholdhigh){ |
Bartvaart | 18:eec0880fcded | 6 | if ( y <= thresholdlow){ |
Bartvaart | 18:eec0880fcded | 7 | mode = 1; |
Bartvaart | 18:eec0880fcded | 8 | } |
Bartvaart | 19:6c0245063b96 | 9 | if (y > thresholdhigh){ |
Bartvaart | 19:6c0245063b96 | 10 | mode = 3; |
Bartvaart | 19:6c0245063b96 | 11 | } |
Bartvaart | 18:eec0880fcded | 12 | if (y > thresholdmid && mode == 1){ |
Bartvaart | 18:eec0880fcded | 13 | mode = 2; |
Bartvaart | 18:eec0880fcded | 14 | } |
Bartvaart | 18:eec0880fcded | 15 | return mode; |
Bartvaart | 18:eec0880fcded | 16 | } |