EE149
/
FinalProject
Final Project files for mBed development.
Revision 23:e4616259a7f0, committed 2014-12-07
- Comitter:
- alecguertin
- Date:
- Sun Dec 07 05:55:38 2014 +0000
- Parent:
- 22:46b9d9b2e35c
- Child:
- 24:b797563776fc
- Commit message:
- yay!
Changed in this revision
main.c | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.c Sun Dec 07 04:39:33 2014 +0000 +++ b/main.c Sun Dec 07 05:55:38 2014 +0000 @@ -379,6 +379,10 @@ theta = atan(((double) delta_x)/((double) delta_y)); theta *= 57.29; delta_a = theta-angle; + if (delta_x < 0 && delta_y < 0) { + delta_a += 180; + } + angle += theta; pi.cls(); pi.locate(0,0); pi.printf("a:%f", delta_a);