For Josie

Dependencies:   MMA8451Q mbed nRF24L01P

Fork of Acclerometer_node by Sensor CDT

Revision:
8:81a97ad26339
Parent:
5:9195756445e4
--- a/main.cpp	Thu Jul 23 10:51:17 2015 +0000
+++ b/main.cpp	Fri Jul 24 14:07:46 2015 +0000
@@ -59,11 +59,11 @@
     thetavec_av_z.assign (20, 0);
     sig.assign (20,0);
 
-    int threshold1 = 1.0105;
-    int threshold2 = 1.2639;
-    int threshold3 = 0.8398;
-    int threshold4 = 0.2050;
-    int threshold5 = 0.5905;
+    const float threshold1 = 1.0105;
+    const float threshold2 = 1.2639;
+    const float threshold3 = 0.8398;
+    const float threshold4 = 0.2050;
+    const float threshold5 = 0.5905;
 
     /*my_nrf24l01p.powerUp();
     my_nrf24l01p.setTransferSize( TRANSFER_SIZE );
@@ -122,10 +122,10 @@
         z_data.push_back (z);
         sig.push_back (root);
 
-        x_data.pop_back();
-        y_data.pop_back();
-        z_data.pop_back();
-        sig.pop_back ();
+        x_data.erase(x_data.begin());
+        y_data.erase(y_data.begin());
+        z_data.erase(z_data.begin());
+        sig.erase (sig.begin());
 
 
         //printf ("x_data\n\r");
@@ -140,7 +140,7 @@
         //thetavec_y.push_back (theta_y);
         //thetavec_x.push_back (theta_x);
 
-        thetavec_z.pop_back ();
+        thetavec_z.erase (thetavec_z.begin());
         //thetavec_y.pop_back ();
         //thetavec_x.pop_back ();
 
@@ -283,6 +283,6 @@
 
         //printf("sent");
 
-        wait(0.05);
+        wait(0.1);
     }
 }
\ No newline at end of file