Renaming leftover mMaxAccelerationData -> mAccelerationData

master
denes 6 years ago
parent 327c431a8e
commit ccecfc1743

@ -40,7 +40,7 @@ MovesenseExerciseService::MovesenseExerciseService()
isRunning(false), isRunning(false),
mLastTimeStamp(0), mLastTimeStamp(0),
mTimer(whiteboard::ID_INVALID_TIMER), mTimer(whiteboard::ID_INVALID_TIMER),
mMaxAccelerationData(SAMPLE_RATE) mAccelerationData(SAMPLE_RATE)
{ {
} }
@ -189,7 +189,7 @@ void MovesenseExerciseService::onNotify(whiteboard::ResourceId resourceId, const
for (size_t i = 0; i < arrayData.size(); i++) for (size_t i = 0; i < arrayData.size(); i++)
{ {
mMaxAccelerationData.push_back(arrayData[i]); mAccelerationData.push_back(arrayData[i]);
} }
} }
break; break;
@ -270,11 +270,11 @@ void MovesenseExerciseService::onTimer(whiteboard::TimerId timerId)
/// @todo The timestamp is the last measurement's timestamp and not the current time. /// @todo The timestamp is the last measurement's timestamp and not the current time.
WB_RES::SampleDataValue sampleDataValue; WB_RES::SampleDataValue sampleDataValue;
sampleDataValue.relativeTime = mLastTimeStamp; sampleDataValue.relativeTime = mLastTimeStamp;
sampleDataValue.value = SumVectorAverage(mMaxAccelerationData); sampleDataValue.value = SumVectorAverage(mAccelerationData);
// Reset members // Reset members
mLastTimeStamp = 0; mLastTimeStamp = 0;
mMaxAccelerationData.clear(); mAccelerationData.clear();
// and update our WB resource. This causes notification to be fired to our subscribers // and update our WB resource. This causes notification to be fired to our subscribers
updateResource(WB_RES::LOCAL::EXERCISE_SUMVECTOR_DENES(), updateResource(WB_RES::LOCAL::EXERCISE_SUMVECTOR_DENES(),

@ -132,6 +132,6 @@ private:
whiteboard::TimerId mTimer; whiteboard::TimerId mTimer;
size_t mSamplesIncluded; size_t mSamplesIncluded;
std::vector<whiteboard::FloatVector3D> mMaxAccelerationData; std::vector<whiteboard::FloatVector3D> mAccelerationData;
uint32_t mLastTimeStamp; uint32_t mLastTimeStamp;
}; };

Loading…
Cancel
Save