4180-L4

Dependencies:   4DGL-uLCD-SE mbed-rtos mbed

Files at this revision

API Documentation at this revision

Comitter:
rfarr6
Date:
Tue Oct 21 17:46:26 2014 +0000
Parent:
1:5865153bda08
Commit message:
updated noise margins

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 5865153bda08 -r 5b231e0d0718 main.cpp
--- a/main.cpp	Tue Oct 21 14:53:05 2014 +0000
+++ b/main.cpp	Tue Oct 21 17:46:26 2014 +0000
@@ -145,7 +145,7 @@
         wall_x_pos1 -= 2;
     } else {
         wall_x_pos1 = wall_x_pos3 + 80 - (rand() % score);
-        opening_y_pos1 = (int)(ain*100.0) % 46 + 20;
+        opening_y_pos1 = (int)(ain*1000.0) % 46 + 20;
         score++;
     }
     
@@ -153,7 +153,7 @@
         wall_x_pos2 -= 2;
     } else {
         wall_x_pos2 = wall_x_pos1 + 80 - (rand() % score);
-        opening_y_pos2 = (int)(ain*100.0) % 46 + 20;
+        opening_y_pos2 = (int)(ain*1000.0) % 46 + 20;
         score++;
     }
     
@@ -161,7 +161,7 @@
         wall_x_pos3 -= 2;
     } else {
         wall_x_pos3 = wall_x_pos2 + 80 - (rand() % score);
-        opening_y_pos3 = (int)(ain*100.0) % 46 + 20;
+        opening_y_pos3 = (int)(ain*1000.0) % 46 + 20;
         score++;
     }
 }