Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 1:17fdd812cb8d, committed 2019-05-30
- Comitter:
- boro
- Date:
- Thu May 30 13:21:44 2019 +0000
- Parent:
- 0:5a93e4916fb1
- Commit message:
- a
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu May 30 12:41:57 2019 +0000
+++ b/main.cpp Thu May 30 13:21:44 2019 +0000
@@ -35,8 +35,8 @@
enable = 1;
// variables for measurement in one axis
- int nData = 1500;
- int nSave = 10;
+ int nData = 5000;
+ int nSave = 1;
int delayMeasure = 3000;
int * T = new int[nData]();
float * Mes1 = new float[nData]();
@@ -71,7 +71,7 @@
float accX = imu.readAccelerationX();
// save data in object measure-variables
- if (t % nSave == 0) {
+ if (t % nSave == 0 && stable) {
*(T+mesInd) = t;
*(Mes1+mesInd) = accX;
*(Mes2+mesInd) = accX;
@@ -80,8 +80,8 @@
// reset index if array are full
if(mesInd == nData){mesInd = 0;}
- if(previousStable&&!stable){sendMeasure == true;}
- previousStable = stable;
+ // stability condition
+ //if(...){stable = false;}
// send measure to console
if(sendMeasure) {