If you look at the implementation of the rotary’s in ESN17
you will see that these are separate from the application(s)
I think it’s important to adjust your deployment
so that the rotary’s come loose from the application
and not mixed in the application as is currently the case.
In summary
a rotary consists of:
1/ Switch
a switch that you can press
the value is 0 if not pressed or
the time in ms from the time of impressions
2/ Encoder
the encoder has no 0 point, everything is relative
and can be rotated clockwise or counterclockwise by hand
the speed with which one does can also be a given
the encoder value can be: 0, positive (CW) or negative (CCW)
and is set back to 0 after the application has used its value
the speed value is the average pulse time in ms of the last 5 rotary steps