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.
Fork of DEBUG_10K by
Diff: cal.cpp
- Revision:
- 1:2967e2507d52
- Parent:
- 0:1b13f03ce7eb
diff -r 1b13f03ce7eb -r 2967e2507d52 cal.cpp --- a/cal.cpp Thu Mar 08 14:38:32 2018 +0000 +++ b/cal.cpp Thu Mar 08 15:58:06 2018 +0000 @@ -61,14 +61,14 @@ //pw id pulse width of level 0 double angle=1; double temp=0; - if (pw>=320||pw<=480) + if (pw>320&&pw<=480) { //angle=(pw-320)/320*180; temp=(double)pw;//+0.5 angle=temp/16*9-180; return angle; } - else if (pw>=160||pw<=320) + else if (pw>=160&&pw<=320) { //angle=(320-pw)/320*180; temp=(double)pw;//+0.5