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

@ -16,7 +16,7 @@ typedef union {
namespace Config {
const uint32_t MAGIC_TOKEN = 0xDEADBEE0;
const uint32_t MAGIC_TOKEN = 0xDEADBEE1;
const int MAGIC = 0;
const int ADC1START = 4;

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;
}