From e2a584ccb925e1f2657d2f9757ab0f5d657d8aba Mon Sep 17 00:00:00 2001 From: Nick Van Doorn Date: Wed, 24 Oct 2018 22:45:24 -0700 Subject: Re-add path formatting --- motionMonitor/motionMonitor.c | 4 ++++ 1 file changed, 4 insertions(+) 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; -- cgit v1.2.3