mirror of https://github.com/nymea/nymea.git
Fix filters genering wrong data types
When enabling a jitter filter on integer states (e.g. a signal strength that repeatedly jumps up and down by 1), old code may cause integer state to be populated with floating point values as the filtering happens after the intial validation for the new value being valid.pull/517/head
parent
45081ad64e
commit
bbc585e92e
|
|
@ -401,6 +401,7 @@ void Thing::setStateValue(const StateTypeId &stateTypeId, const QVariant &value)
|
|||
if (filter) {
|
||||
filter->addValue(newValue);
|
||||
newValue = filter->filteredValue();
|
||||
newValue.convert(stateType.type());
|
||||
}
|
||||
|
||||
QVariant oldValue = m_states.at(i).value();
|
||||
|
|
|
|||
Loading…
Reference in New Issue