ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el18lg

Dependencies:   mbed

Revision:
6:266fb8fc17f4
Parent:
5:e0f08e8022de
Child:
9:f3259d652208
--- a/Head/Head.cpp	Thu May 28 16:29:55 2020 +0000
+++ b/Head/Head.cpp	Thu May 28 22:56:46 2020 +0000
@@ -35,7 +35,7 @@
     // update y value depending on direction of movement
     // North is decrement as origin is at the top-left so decreasing moves up
     
-    _speed = int(mag*10.0f);
+    _speed = int(mag*4.0f);
     if (d == N && d != S){
             _y -= _speed;
             
@@ -51,10 +51,7 @@
     if (d == E && d != W){
            
             _x += _speed;
-        }
-                    
-                    
-                    
+        }                  
     }
     // The head changes to the new position