Polar sand table - Arduino

So I have made some picture and a video for better understanding

Let start with a square table. It’s same issue that rectangulare but easier to test!
We assume the following position to be the homing position:
image
And with assume this is the position of both arms before doing the homing. Let see the 3 surface where both arm can move. Cercle for the lower arm and 0 to Pi for the upper arm. Red arrow is the running direction. Blue arrow is the homing direction:

And now we do the homing in video:

This must work in all case but my problem now is I don’t know how to disable motor hold of the upper arm during homing of the moteur of the lower arm any help