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
00001 #include "Mode.h" 00002 // Determine mode from thresholds 00003 int Mode(int mode, double y, double thresholdlow, double thresholdmid, double thresholdhigh){ 00004 if ( y <= thresholdlow){ // lowest threshold 00005 mode = 1; 00006 } 00007 else if (y > thresholdhigh){ // above highest threshold 00008 mode = 3; 00009 } 00010 if (y > thresholdmid && mode == 1){ // Not from mode 3 to mode 2 00011 mode = 2; 00012 } 00013 return mode; 00014 }
Generated on Sun Jul 17 2022 19:57:41 by
1.7.2
