A finding:
Motor position have to really be though as an “angle” but relative to earth horizon.
The 0 position is horizontal, and Kinect motorisation will automatically compensate for non horizontal pedestal.
Fine,
this automatisme make sense, BUT it also change the max and min for motor position value.
I found that range is -16K to +16K not -8000 to +8000.
Also the scale is overkill, I didn’t found the rule but motor do not move between 2 call if values is not different by something like 1000. (seems that there is a finer granularity around 0)
But if pedestal is already tilted, you MUST be carefull with the value as the tilting already offset the 0 position making one of the limit overlimit.
This may be NOT inocuitous as it seems that motor try to engage and fail even if value is less than max but tilt had already reach the maximum. So it may burn motor unless a protection is included with it. (very plausible)
Anyway the behavior of the “position” as to be understood from a earth horizontal point of view, NOT from the pedestal position.
(Make a few experiment with sampel code while keeping pedestal tilted with your hand you you will get it very easily)