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: mbed
Revision 18:d7a681bc22e5, committed 2017-04-05
- Comitter:
- jennabarton
- Date:
- Wed Apr 05 02:12:47 2017 +0000
- Parent:
- 17:08d6d9badb3f
- Child:
- 19:0dd0fe82c3e7
- Commit message:
- working but limited scope of reading
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Apr 05 01:49:16 2017 +0000 +++ b/main.cpp Wed Apr 05 02:12:47 2017 +0000 @@ -51,7 +51,7 @@ //movement int deadzone = 1; -int mouseMoveMult = 20; +int mouseMoveMult = 1; //counts for clicks int clickDeadzone = 10; @@ -87,7 +87,9 @@ //NOTE: hard coded wait of 0.1 void mouseCommand(char buttons, short x, short y) { x = mouseMoveMult*x; + x = x*x; y = mouseMoveMult*y; + y = y*y; keyOut.putc(0xFD); keyOut.putc(0x00); @@ -414,7 +416,7 @@ //attach ticker for interrupt //mouseStateTicker.attach_us(&updateMouseState, 100); - mouseStateTicker.attach(&updateMouseState, 0.1); + mouseStateTicker.attach(&updateMouseState, 0.01); //loop to search for new info using the camera