another small fix
This commit is contained in:
2
Config.h
2
Config.h
@ -16,7 +16,7 @@ typedef union {
|
|||||||
|
|
||||||
|
|
||||||
namespace Config {
|
namespace Config {
|
||||||
const uint32_t MAGIC_TOKEN = 0xDEADBEE0;
|
const uint32_t MAGIC_TOKEN = 0xDEADBEE1;
|
||||||
|
|
||||||
const int MAGIC = 0;
|
const int MAGIC = 0;
|
||||||
const int ADC1START = 4;
|
const int ADC1START = 4;
|
||||||
|
@ -32,7 +32,7 @@ void Thermometer::exec(float r) {
|
|||||||
if (m_lastSmoothedTemperature == INVALID_TEMPERATURE) {
|
if (m_lastSmoothedTemperature == INVALID_TEMPERATURE) {
|
||||||
temperature = temperatureRaw;
|
temperature = temperatureRaw;
|
||||||
} else {
|
} else {
|
||||||
temperature = alpha * temperatureRaw + (1 - alpha) * m_lastSmoothedTemperature;
|
temperature = alpha * temperatureRaw + (1.0 - alpha) * m_lastSmoothedTemperature;
|
||||||
}
|
}
|
||||||
m_lastSmoothedTemperature = temperature;
|
m_lastSmoothedTemperature = temperature;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user