another small fix

This commit is contained in:
hg
2014-11-17 22:16:01 +01:00
parent 404975ec06
commit 9ab050c430
2 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ void Thermometer::exec(float r) {
if (m_lastSmoothedTemperature == INVALID_TEMPERATURE) {
temperature = temperatureRaw;
} else {
temperature = alpha * temperatureRaw + (1 - alpha) * m_lastSmoothedTemperature;
temperature = alpha * temperatureRaw + (1.0 - alpha) * m_lastSmoothedTemperature;
}
m_lastSmoothedTemperature = temperature;
}