+
+ if ( hysteresis > 0 ) {
+ int last_raw_value = 0;
+ prop = child->getChild( "last-raw-value", 0, true );
+ last_raw_value = prop->getIntValue();
+
+ if ( abs(raw_value - last_raw_value) < hysteresis )
+ {
+ // not enough movement stay put
+ raw_value = last_raw_value;
+ } else {
+ // update last raw value
+ prop->setIntValue( raw_value );
+ }
+ }
+