Commit 577f1656 authored by Michael Ott's avatar Michael Ott
Browse files

Apply factor also for unsigned readings

parent d8b0a672
......@@ -233,9 +233,9 @@ public:
if( _delta ) {
if (!_firstReading) {
if (rawReading.value < _lastRawUValue.value)
reading.value = (rawReading.value + (_deltaMax - _lastRawUValue.value)) * factor;
reading.value = (rawReading.value + (_deltaMax - _lastRawUValue.value)) * factor * _factor;
else
reading.value = (rawReading.value - _lastRawUValue.value) * factor;
reading.value = (rawReading.value - _lastRawUValue.value) * factor * _factor;
} else {
_firstReading = false;
_lastRawUValue = rawReading;
......@@ -244,7 +244,7 @@ public:
_lastRawUValue = rawReading;
}
else
reading.value = rawReading.value * factor;
reading.value = rawReading.value * factor * _factor;
storeReadingLocal(reading);
if (storeGlobal) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment