Fix #753: Only apply offset if data is in the buffer to prevent negative numbers
This commit is contained in:
parent
041249523e
commit
d099bc4ff8
@ -100,7 +100,7 @@ float StatisticsParser::getChannelFieldValue(ChannelType_t type, ChannelNum_t ch
|
|||||||
}
|
}
|
||||||
|
|
||||||
result /= static_cast<float>(div);
|
result /= static_cast<float>(div);
|
||||||
if (setting != NULL) {
|
if (setting != NULL && _statisticLength > 0) {
|
||||||
result += setting->offset;
|
result += setting->offset;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user