summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJoey Castillo <joeycastillo@utexas.edu>2022-02-20 14:24:10 -0500
committerJoey Castillo <joeycastillo@utexas.edu>2022-02-20 14:24:10 -0500
commit64540817703b2ad7f221774dc02c45ff9c750b86 (patch)
tree8da1eecc35d72cda05314937c12f7ebabf9423c2 /apps
parentf5be9755b69e8e550ee132eb41118a2a7db1c5a0 (diff)
downloadSensor-Watch-64540817703b2ad7f221774dc02c45ff9c750b86.tar.gz
Sensor-Watch-64540817703b2ad7f221774dc02c45ff9c750b86.tar.bz2
Sensor-Watch-64540817703b2ad7f221774dc02c45ff9c750b86.zip
tweaks for processing script
Diffstat (limited to 'apps')
-rw-r--r--apps/spi-test/app.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/spi-test/app.c b/apps/spi-test/app.c
index b1f28d8b..504835bf 100644
--- a/apps/spi-test/app.c
+++ b/apps/spi-test/app.c
@@ -102,7 +102,7 @@ static void print_records_at_page(uint16_t page) {
printing_header = true;
timestamp = records[i].header.timestamp;
// temperature = records[i].header.info.temperature;
- printf("%c%c.sample%lld.", records[i].header.char1, records[i].header.char2, timestamp);
+ printf("%c%c.%lld.", records[i].header.char1, records[i].header.char2, timestamp);
range = records[i].header.info.range;
break;
case ACCELEROMETER_DATA_ACQUISITION_DATA:
@@ -126,15 +126,19 @@ static void print_records_at_page(uint16_t page) {
switch (range) {
case LIS2DW_RANGE_16_G:
lsb_value = (records[i].data.y.lpmode == LIS2DW_LP_MODE_1) ? 7.808 : 1.952;
+ range = 16;
break;
case LIS2DW_RANGE_8_G:
lsb_value = (records[i].data.y.lpmode == LIS2DW_LP_MODE_1) ? 3.904 : 0.976;
+ range = 8;
break;
case LIS2DW_RANGE_4_G:
lsb_value = (records[i].data.y.lpmode == LIS2DW_LP_MODE_1) ? 1.952 : 0.488;
+ range = 4;
break;
case LIS2DW_RANGE_2_G:
lsb_value = (records[i].data.y.lpmode == LIS2DW_LP_MODE_1) ? 0.976 : 0.244;
+ range = 2;
break;
}
printf("RANGE%d_LP%d_FILT%d.CSV\n", range, records[i].data.y.lpmode + 1, filter);
@@ -179,6 +183,7 @@ static void print_records() {
}
}
+ printf("=== END ===\n");
}
void app_init(void) {