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.
Diff: autoMode.h
- Revision:
- 3:8d8c25c556ae
- Parent:
- 2:738b28f6a04b
- Child:
- 6:ca3a74a93ae2
--- a/autoMode.h Fri Oct 30 09:21:03 2015 +0000 +++ b/autoMode.h Sat Oct 31 00:30:52 2015 +0000 @@ -22,6 +22,7 @@ void autoIM920() { if(b==7){ /*mode change*/ if(edge7) { + Com.detach(); edge7=0; autoflag=0; Indicator4=0; @@ -340,13 +341,21 @@ if(flagf==0){ // Vr = ( 2.0*(-x1) + x2 ) / 3.0; // Vl = ( 2.0*(-x1) - x2 ) / 3.0; - if(x2>0.0){ + /*if(x2>0.0){ Vr = -x1; Vl = -x1 - x2; } else{ Vr = -x1 + x2; Vl = -x1; + }*/ + if(x2>0.0){ + Vr = -x1 + x2; + Vl = -x1; + } + else{ + Vr = -x1; + Vl = -x1 - x2; } } else if(flagf==1){