For Josie
Dependencies: MMA8451Q mbed nRF24L01P
Fork of Acclerometer_node by
Revision 8:81a97ad26339, committed 2015-07-24
- Comitter:
- oaa36
- Date:
- Fri Jul 24 14:07:46 2015 +0000
- Parent:
- 5:9195756445e4
- Commit message:
- For Josie
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- 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
--- a/mbed.bld Thu Jul 23 10:51:17 2015 +0000 +++ b/mbed.bld Fri Jul 24 14:07:46 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/cbbeb26dbd92 \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/bad568076d81 \ No newline at end of file
