diff --git a/Config.h b/Config.h index 49c3232..ffc5185 100644 --- a/Config.h +++ b/Config.h @@ -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; diff --git a/Thermometer.cpp b/Thermometer.cpp index 1516741..e1b9b3c 100644 --- a/Thermometer.cpp +++ b/Thermometer.cpp @@ -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; }