From 9ab050c430bcfd1a27e9ab44da5e92b4b90b21be Mon Sep 17 00:00:00 2001 From: hg Date: Mon, 17 Nov 2014 22:16:01 +0100 Subject: [PATCH] another small fix --- Config.h | 2 +- Thermometer.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; }