Ghost Mouse / Mbed 2 deprecated ghost_mouse

Dependencies:   mbed

Files at this revision

API Documentation at this revision

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