We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 306613a commit 54f8fc8Copy full SHA for 54f8fc8
trikControl/src/linux/rangeSensorWorker.cpp
@@ -116,10 +116,16 @@ void RangeSensorWorker::readFile()
116
117
int RangeSensorWorker::read()
118
{
119
- return mDistance;
+ mLock.lockForRead();
120
+ int const result = mDistance;
121
+ mLock.unlock();
122
+ return result;
123
}
124
125
int RangeSensorWorker::readRawData()
126
- return mRawDistance;
127
128
+ int const result = mRawDistance;
129
130
131
0 commit comments