asterics / AsTeRICS

The Assistive Technology Rapid Integration & Construction Set
http://www.asterics.eu
Other
57 stars 27 forks source link

Deadzone events "exitZone" and "enterZone" wrong documented/implemented?! #282

Closed klues closed 5 years ago

klues commented 5 years ago

I am confused about the events exitZone and enterZone of the Deadzone plugin:

Documentation says: http://asterics.github.io/AsTeRICS/help/index.html?plugins&processors//Deadzone.htm

enterZone: This event is triggered when the x or x- and y- values enter the specified radius around the centre. exitZone: This event is triggered when the x or x- and y- values leave the specified radius around the centre.

Implementation is this: https://github.com/asterics/AsTeRICS/blob/56f59f844f2a1c038ff4807ee208127d2033298b/ARE/components/processor.deadzone/src/main/java/eu/asterics/component/processor/deadzone/DeadzoneInstance.java#L264 etpEnterZone.raiseEvent(); ist called if dist >= propRadius, so if the values leave the radius around the centre. This is the opposite of the documentation, isn't it? The same applies to the exitZone event.

klues commented 5 years ago

@ChrisVeigl @deinhofer isn't this a bug?

deinhofer commented 5 years ago

yes, I think you are right. Looks like a copy&paste failure. But how to fix it backwards compatible? Older models might use it this way. We could correct also in the models which are in the Asterics repository, but it would still be a problem, if you want to deploy a fixed model to an older ARE instance e.g. 3.0.