summaryrefslogtreecommitdiff
path: root/motionMonitor/motionMonitor.c
diff options
context:
space:
mode:
authorNick Van Doorn <vandoorn.nick@gmail.com>2018-10-24 22:45:24 -0700
committerNick Van Doorn <vandoorn.nick@gmail.com>2018-10-24 22:45:24 -0700
commite2a584ccb925e1f2657d2f9757ab0f5d657d8aba (patch)
treecf5895e7e683980df5191046b914955bf216f5a8 /motionMonitor/motionMonitor.c
parente5da1bc769e6d010f13f2181988a7b271b8cb415 (diff)
Re-add path formatting
Diffstat (limited to 'motionMonitor/motionMonitor.c')
-rw-r--r--motionMonitor/motionMonitor.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/motionMonitor/motionMonitor.c b/motionMonitor/motionMonitor.c
index d02c20d..3ded30e 100644
--- a/motionMonitor/motionMonitor.c
+++ b/motionMonitor/motionMonitor.c
@@ -45,23 +45,27 @@ le_result_t brnkl_motion_getCurrentAcceleration(double* xAcc,
char path[256];
double scaling = 0.0;
+ snprintf(path, sizeof(path), FormatStr, AccType, CompScale);
r = ioutil_readDoubleFromFile(path, &scaling);
if (r != LE_OK) {
goto done;
}
+ snprintf(path, sizeof(path), FormatStr, AccType, CompX);
r = ioutil_readDoubleFromFile(path, xAcc);
if (r != LE_OK) {
goto done;
}
*xAcc *= scaling;
+ snprintf(path, sizeof(path), FormatStr, AccType, CompY);
r = ioutil_readDoubleFromFile(path, yAcc);
if (r != LE_OK) {
goto done;
}
*yAcc *= scaling;
+ snprintf(path, sizeof(path), FormatStr, AccType, CompZ);
r = ioutil_readDoubleFromFile(path, zAcc);
*zAcc *= scaling;